mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
Handle DOCKER_HOST environment for podman-docker package
Rootless users should be defaulted to point DOCKER_HOST at $XDG_RUNTIME_DIR/podman/podman.sock When podman-docker package is installed. [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
11
docker/podman-docker.sh
Normal file
11
docker/podman-docker.sh
Normal file
@ -0,0 +1,11 @@
|
||||
# DOCKER_HOST initialization
|
||||
|
||||
if [ -z "$DOCKER_HOST" ]; then
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
export DOCKER_HOST=unix:///run/podman/podman.sock
|
||||
else
|
||||
if [ -n "$XDG_RUNTIME_DIR" ]; then
|
||||
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
||||
fi
|
||||
fi
|
||||
fi
|
Reference in New Issue
Block a user