From c2b0967f0752c591e1609dc094bb1b04ab476a66 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 Dec 2017 14:18:30 -0500 Subject: [PATCH] misc/docker: refactor aliases --- misc/docker/aliases.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/docker/aliases.zsh b/misc/docker/aliases.zsh index 15acd61b..44e8b859 100644 --- a/misc/docker/aliases.zsh +++ b/misc/docker/aliases.zsh @@ -1,3 +1,9 @@ +alias docker='sudo docker' +alias docker-compose='sudo docker-compose' + +alias dkc=docker-compose +alias dkm=docker-machine + dk() { case $(_os) in macos) if [[ -z $DOCKER_HOST ]]; then @@ -6,8 +12,5 @@ dk() { ;; arch) systemctl -q is-active docker || sudo systemctl start docker ;; esac - sudo docker $@ + docker $@ }; compdef dk=docker - -alias dkc=docker-compose -alias dkm=docker-machine