Skip to content

Commit

Permalink
Fix podman detection in CI scripts
Browse files Browse the repository at this point in the history
When docker-podman compat was set up in a way that causes "docker"
to be the argv[0] of podman, the previous detection did not work.
This was for example the case in the compat package from nixpkgs.

This checks the output and should work everywhere.

Tested locally with `DEPLOY=1 bash src/ci/docker/run.sh
dist-x86_64-linux` locally.
  • Loading branch information
Noratrieb committed Oct 15, 2023
1 parent ff5664d commit 4c886b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ else
args="$args --volume /tmp/toolstate:/tmp/toolstate"

id=$(id -u)
if [[ "$id" != 0 && "$(docker -v)" =~ ^podman ]]; then
if [[ "$id" != 0 && "$(docker version)" =~ Podman ]]; then
# Rootless podman creates a separate user namespace, where an inner
# LOCAL_USER_ID will map to a different subuid range on the host.
# The "keep-id" mode maps the current UID directly into the container.
Expand Down

0 comments on commit 4c886b6

Please sign in to comment.