Hi all!
I tried to set up an Execution Environment following the official articles Setting up your environment and Building your first Execution Environment, but the builder command fails (not all lines shown):
ansible-builder build --tag postgresql_ee --container-runtime docker
...
> [base 5/6] RUN /output/scripts/pip_install /usr/bin/python3:
0.169 + PYCMD=/usr/bin/python3
0.169 + '[' -z /usr/bin/python3 ']'
0.169 + '[' '!' -x /usr/bin/python3 ']'
0.169 + echo '/usr/bin/python3 is not an executable'
0.169 + exit 1
0.169 /usr/bin/python3 is not an executable
------
Dockerfile:26
--------------------
24 | COPY _build/scripts/entrypoint /opt/builder/bin/entrypoint
25 | RUN $PKGMGR install $PYPKG -y ; if [ -z $PKGMGR_PRESERVE_CACHE ]; then $PKGMGR clean all; fi
26 | >>> RUN /output/scripts/pip_install $PYCMD
27 | RUN $PYCMD -m pip install --no-cache-dir $ANSIBLE_INSTALL_REFS
...
I am using a Python virtual environment, from this official procedure, because my attempt to use Pip failed:
pip install ansible-navigator
error: externally-managed-environment
...
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
...
The Dockerfile context/Dockerfile installs Python and the Execution Environment file execution-environment.yml lists Python as a dependency. But, somehow, the process runs /output/scripts/pip_install /usr/bin/python3 without Python installed. I also inserted a rpm -qa | grep python and a find / -type f -name 'python*' -exec ls -l '{}' \+ in pip_install script, and confirmed there’s no Python in the container.
Questions:
- What can be going wrong?
- Is there any log or option to see full output?
ansible-builder only show last 20 lines of output, so I don’t know if there’s any earlier error.
My setup
- OS: Ubuntu 24.04.2 LTS
- Running on: WSL 2.7.13.0
- Docker version: 29.1.3
- docker-compose version: 1.29.2
- Python venv version: 3.12.3
- Non-privileged user, included in
docker group
I installed Podman (version 4.9.3) and ran again, getting some new warnings. Can this lack of multiple capabilities prevent Python installation?
ansible-builder build --tag postgresql_ee
File context/_build/scripts/pip_install had modifications and will be rewritten
Running command:
podman build -f context/Containerfile -t postgresql_ee context
...showing last 20 lines of output...
--> 94015b39d9b9
[1/4] STEP 15/16: RUN /output/scripts/pip_install $PYCMD
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_CHOWN: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_DAC_OVERRIDE: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_FOWNER: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_FSETID: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_KILL: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_NET_BIND_SERVICE: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_SETFCAP: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_SETGID: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_SETPCAP: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_SETUID: operation not permitted"
time="2026-09-07T18:11:23-03:00" level=warning msg="can't raise ambient capability CAP_SYS_CHROOT: operation not permitted"
+ PYCMD=/usr/bin/python3
+ '[' -z /usr/bin/python3 ']'
+ '[' '!' -x /usr/bin/python3 ']'
/usr/bin/python3 is not an executable
+ echo '/usr/bin/python3 is not an executable'
+ exit 1
Error: building at STEP "RUN /output/scripts/pip_install $PYCMD": while running runtime: exit status 1
An error occurred (rc=1), see output line(s) above for details.