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

Add buildah as container runtime #721

Open
jensrudolf opened this issue Dec 18, 2024 · 2 comments
Open

Add buildah as container runtime #721

jensrudolf opened this issue Dec 18, 2024 · 2 comments

Comments

@jensrudolf
Copy link

Good Afternoon.

Podman has some limitations/features especially when run as Podman in Podman. E.g. masking of some paths in /proc for security reasons. This leads to errors like:

[1/4] STEP 12/12: RUN /output/scripts/pip_install $PYCMD
error running container: from /usr/bin/crun creating container for [/bin/sh -c /output/scripts/pip_install $PYCMD]: mount `proc` to `proc`: Operation not permitted
: exit status 

when running ansible-builder from within the Ansible Dev Tools container which itself is executed in a CI pipeline running on a docker/podman executor.

However, building the Containerfile with buildah, e.g. from quay.io/containers/buildah:lastest runs flawlessly. In the end it would be nice to have buildah also added to the dev tools container but integration into ansible-builder as selectable container runtime would be a good first step IMHO.

BR
Jens

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Dec 18, 2024
@Shrews
Copy link
Contributor

Shrews commented Dec 18, 2024

I know that in newer version of the ADT container, they made some changes to how they built that container that allows ansible-builder to work within the podman-in-podman environment. I'm not certain what version that would be in, so you'd need to either try the latest version, or check with the dev tools team for specifics.

@Shrews Shrews removed the needs_triage New item that needs to be triaged label Dec 18, 2024
@jensrudolf
Copy link
Author

jensrudolf commented Dec 19, 2024

I am already on community-ansible-dev-tools:v2024.12.0 (latest) which was released two days ago. Unfortunately, I still get the same error: podman masks parts of /proc which results in failure of the RUN statement of the generated containerfile during podman build.

As podman is primarily for running pods and containers, wouldn't it make more sense to use buildah anyway? It is specifically engineered for building container images and that's what ansible-builder is doing at its heart.

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