Skip to content

Commit 3d46ccc

Browse files
committed
uses podman-compose when installed
1 parent 25bee3e commit 3d46ccc

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/docker.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
#!/bin/bash
22

3-
alias dc='docker compose'
3+
#alias dc='docker compose'
44

55
__lazy_install lazydocker
66
__lazy_install docker-compose
77

8+
function dc(){
9+
if command podman-compose --help 2>&1 >/dev/null; then
10+
podman-compose $*
11+
else
12+
docker compose $*
13+
fi
14+
}
15+
816
function docker_build_mounted_run(){
917
local image="test-$RANDOM"
1018
docker build -t "$image" .
@@ -63,4 +71,4 @@ function docker_logs() {
6371
if [[ ${platform} == "linux" ]]; then
6472
systemctl --user start podman.socket >&2 2> /dev/null
6573
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
66-
fi
74+
fi

0 commit comments

Comments
 (0)