You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this looks to create the following error during the build where ansible-builder is expecting to find /usr/bin/dnf, but it appears the image is using /usr/bin/microdnf instead:
3.069 /output/scripts/assemble: line 163: /usr/bin/dnf: No such file or directory
------
Dockerfile:57
--------------------
55 | COPY _build/requirements.txt requirements.txt
56 | RUN $PYCMD /output/scripts/introspect.py introspect --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt
57 | >>> RUN /output/scripts/assemble
58 |
59 | # Final build stage
--------------------
ERROR: failed to solve: process "/bin/sh -c /output/scripts/assemble" did not complete successfully: exit code: 127
Adding the following to the execution-environment.yml resolves it:
Your modification of the execution-environment.yml file to resolve the issue is the proper way of dealing with this.
Because the package manager is used within the dynamically built Containerfile with a RUN instruction (for example, to install the user's selected version of Python), and we do not do any sort of probing of the selected container image itself, it is required that you define the package manager within the EE file. If the assemble script were the only place the package manager was used, we could programmatically figure out which one exists because it is run within the container.
As such, your original bug report to ansible-dev-tools is completely valid, and I'll be closing this one.
Team,
The docs for
ansible-dev-tools
suggest creating a customexecution-environment.yml
with the following:However, this looks to create the following error during the build where
ansible-builder
is expecting to find/usr/bin/dnf
, but it appears the image is using/usr/bin/microdnf
instead:Adding the following to the
execution-environment.yml
resolves it:I originally opened an issue on
ansible-dev-tools
and was referred here ansible/ansible-dev-tools#284 by @ssbarneaThe text was updated successfully, but these errors were encountered: