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

Podman support #30

Merged
merged 5 commits into from
Nov 17, 2023
Merged

Podman support #30

merged 5 commits into from
Nov 17, 2023

Conversation

ydirson
Copy link

@ydirson ydirson commented Nov 10, 2023

Builds on #29

@ydirson ydirson requested a review from stormi November 10, 2023 16:40
@ydirson ydirson force-pushed the podman branch 2 times, most recently from 1853180 to 016050b Compare November 13, 2023 08:51
run.py Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
Copy link
Member

@stormi stormi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but what will happen if podman is installed, but also provides the docker command, as is the case on Fedora and maybe elsewhere?

@ydirson
Copy link
Author

ydirson commented Nov 13, 2023

LGTM, but what will happen if podman is installed, but also provides the docker command, as is the case on Fedora and maybe elsewhere?

Good point. Would indeed seem to advocate for looking for podman before docker 😈

It would require identifying that a docker binary is indeed podman, likely with:

$ docker --version 2>/dev/null
podman version 4.7.2

But that case already does not work today, this PR just does not address that particular issue (ie. we could handle this in a separate PR).

It currently passes format checks only by abuse, and won't pass any more
with following commits.

Signed-off-by: Yann Dirson <[email protected]>
We're going to introduce podman support, this prepares the doc to make
real changes easier to review.

Signed-off-by: Yann Dirson <[email protected]>
podman does not interact with a daemon running as root, so unlike docker
it will not be able to modify files owned by arbitrary users including root.

To keep with current practices, we need to pass --userns=keep-id so it can
write into the user's directories: the `builder` user inside the container
is indeed equivalent to the user launching the container.

All other users including root are mapped UIDs not existing on the host
(typically 100000 and above), so any file created by such users in build
trees in the container will (by design) have those (numeric-only) owners
on the host if they remain after the build.

Signed-off-by: Yann Dirson <[email protected]>
`podman-docker` installs a `docker` binary calling `podman`, we have to
call it to discover how to properly handle it.

Signed-off-by: Yann Dirson <[email protected]>
@stormi stormi merged commit a9eb238 into master Nov 17, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants