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

Dockerfile vs buildah vs podman #1

Open
dmsimard opened this issue Feb 11, 2022 · 4 comments
Open

Dockerfile vs buildah vs podman #1

dmsimard opened this issue Feb 11, 2022 · 4 comments

Comments

@dmsimard
Copy link
Contributor

https://github.com/ansible-community/images/blob/main/ansible-test/centos-stream8/build.sh suggests an approach that uses buildah to build container images instead of Docker and Dockerfiles.

Although this may be controversial, I thought it was important to try in order to demonstrate what it would look like even if we end up deciding on using Dockerfiles like the ones provided by ansible-test instead.

Feel free to discuss here.

@konstruktoid
Copy link

Even if the build scripts aren’t complicated, using buildah seems like an overly complicated way of doing this compared to using a Dockerfile, especially since the code doesn't actually create a image but only modify an existing one.

And by using Dockerfile we support both docker and podman.

@felixfontein
Copy link
Collaborator

The main advantage of using buildah over Dockerfiles is that it allows to mount files/directories during the build process. With Dockerfiles, you have to copy their content in (and later delete them again).

@konstruktoid
Copy link

The main advantage of using buildah over Dockerfiles is that it allows to mount files/directories during the build process.

That's possible with Docker/podman volumes as well.

With Dockerfiles, you have to copy their content in (and later delete them again).

Is that an issue?
And I assume the containers are ephemeral and will be deleted anway.

@dmsimard
Copy link
Contributor Author

Even if the build scripts aren’t complicated, using buildah seems like an overly complicated way of doing this compared to using a Dockerfile, especially since the code doesn't actually create a image but only modify an existing one.

I find bash far more simple and powerful than the Dockerfile language and daemon intricacies but that's just my opinion and I'd rather avoid getting into an unproductive political/holy debate like vim vs emacs. It's OK if you prefer something else.

And by using Dockerfile we support both docker and podman.

I would say it is a requirement for the built and published images to work under both Docker and podman but thankfully that is mostly a solved problem (thank you, OCI standards).

However, I don't see a need or requirement to lock ourselves into a single toolkit for building the images themselves.

Contributors are welcome to submit (and maintain!) Dockerfiles if that is what they need or what they prefer.

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

3 participants