Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-builder raise exception when i user fedora 41 image #720

Closed
Scroker opened this issue Dec 5, 2024 · 1 comment
Closed

ansible-builder raise exception when i user fedora 41 image #720

Scroker opened this issue Dec 5, 2024 · 1 comment

Comments

@Scroker
Copy link

Scroker commented Dec 5, 2024

If i use quay.io/fedora/fedora:40 or quay.io/fedora/fedora:latest image on execution-enviroment.yml ansible-builder raise this exception:

Running command:
  podman build -f context/Containerfile -t fedora_ee context
...showing last 20 lines of output...
[1/4] STEP 9/14: ARG ANSIBLE_INSTALL_REFS
--> Using cache 179726f9e18229a7c201febdc6caf79f9b958520a92236e46f2b2f91241c6a85
--> 179726f9e182
[1/4] STEP 10/14: ARG PKGMGR
--> Using cache 61a7445cc6fb853a510ba5c533bee3edebf0eab9ec736f414ff48cfa80670766
--> 61a7445cc6fb
[1/4] STEP 11/14: COPY _build/scripts/ /output/scripts/
--> Using cache c0b00668e6f575349ea7cded8dbd95494146ab337df4829b6a42b6b82f2e31f0
--> c0b00668e6f5
[1/4] STEP 12/14: COPY _build/scripts/entrypoint /opt/builder/bin/entrypoint
--> Using cache 7c2c0bbea64306c411f994f1d93559636b6946745d09634ea607168034df1592
--> 7c2c0bbea643
[1/4] STEP 13/14: RUN /output/scripts/pip_install $PYCMD
+ PYCMD=/usr/bin/python3
+ '[' -z /usr/bin/python3 ']'
+ '[' '!' -x /usr/bin/python3 ']'
+ echo '/usr/bin/python3 is not an executable'
/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.
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Dec 5, 2024
@Shrews
Copy link
Contributor

Shrews commented Dec 5, 2024

I can't speak to how those fedora images are created, but pulling them down and looking at them shows that Python is not installed. Or if it is, it certainly isn't in the standard location of /usr/bin. The builder team obviously has no control over those images, but we do give you tools to address this situation. In builder 3.1, you may use the dependencies.python_interpreter section of the EE to describe the Python interpreter to install in the base image. The below works for me:

---
version: 3

images:
  base_image:
    name: quay.io/fedora/fedora:latest

dependencies:
  python_interpreter:
    package_system: "python3.13"
    python_path: "/usr/bin/python3.13"
  ansible_core:
    package_pip: ansible-core
  ansible_runner:
    package_pip: ansible-runner

@Shrews Shrews closed this as completed Dec 5, 2024
@Shrews Shrews removed the needs_triage New item that needs to be triaged label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants