Alias docker to podman if docker is absent

Add alias for docker to use podman if docker is not installed.
This commit is contained in:
2026-02-28 12:51:19 +08:00
committed by GitHub
parent 1ed27f61d8
commit 7d51fa17c7
+8
View File
@@ -287,6 +287,14 @@ modern-replace 'tar' 'gtar'
# for ArchLinux compat
modern-replace 'code' 'visual-studio-code-electron'
# If podman exists and docker doesn't exist, alias docker=podman
if ! command -v docker &> /dev/null && command -v podman &> /dev/null; then
alias docker='podman'
if command -v podman-compose &> /dev/null; then
alias docker-compose='podman-compose'
fi
fi
# Set proxy
setproxy() {
addr=${1:-127.0.0.1}