Skip to content

Commit 29d9877

Browse files
authored
Rollup merge of #116761 - Nilstrieb:podman, r=cuviper
Fix podman detection in CI scripts 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. I tested it locally by executing ```sh if [[ "$id" != 0 && "$(docker version)" =~ Podman ]]; then echo yes else echo no fi ``` which printed `no` before, and `yes` now. fixes #113129 r? cuviper
2 parents 2dd1c8f + 6ab84b5 commit 29d9877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ci/docker/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ else
235235
args="$args --volume /tmp/toolstate:/tmp/toolstate"
236236

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

0 commit comments

Comments
 (0)