BUG: Using this image as an EE docs lead to ansible-builder failure for dnf path
netopsengineer opened this issue · 3 comments
netopsengineer commented
Team,
The docs suggest creating an execution-environment.yml
with the following:
---
version: 3
images:
base_image:
name: ghcr.io/ansible/community-ansible-dev-tools:latest
dependencies:
galaxy: requirements.yml
python: requirements.txt
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:
options:
package_manager_path: /usr/bin/microdnf
ssbarnea commented
Please file a bug under builder project, it should support microdnf.
netopsengineer commented
Thanks @ssbarnea!
netopsengineer commented
@ssbarnea the ansible-builder
team indicated this is in fact an issue on the ansible-dev-tools
side, and the behavior with microdnf
is expected and my fix is the way to do it.