Skip to content

Commit bbdfadf

Browse files
committed
perf(conf.zsh): make lazydocker on podman works on linux-gpu
1 parent 383207e commit bbdfadf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

conf.d/zsh/exports.zsh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,15 @@ fi
9292

9393
# set DOCKER_HOST for lazydocker if podman exists
9494
if (( $+commands[podman] )); then
95-
export DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')
95+
if (( $OSTYPE[(I)darwin] )); then
96+
export DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')
97+
elif (( $OSTYPE[(I)linux-gnu] )); then
98+
# systemctl --user enable --now podman.socket
99+
export DOCKER_HOST=unix:///run/user/1000/podman/podman.sock
100+
else
101+
echo 'Unknown OS for lazypodman!'
102+
fi
103+
alias docker='podman'
96104
fi
97105

98106
# vim: set ft=sh :

0 commit comments

Comments
 (0)