From 7d51fa17c7bd1334f90141cdbfd3f493ab2c03dd Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sat, 28 Feb 2026 12:51:19 +0800 Subject: [PATCH] Alias docker to podman if docker is absent Add alias for docker to use podman if docker is not installed. --- scripts/zshrc.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 9405212..002f609 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -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}