misc/docker: refactor aliases
This commit is contained in:
parent
efdddf3130
commit
c2b0967f07
|
@ -1,3 +1,9 @@
|
||||||
|
alias docker='sudo docker'
|
||||||
|
alias docker-compose='sudo docker-compose'
|
||||||
|
|
||||||
|
alias dkc=docker-compose
|
||||||
|
alias dkm=docker-machine
|
||||||
|
|
||||||
dk() {
|
dk() {
|
||||||
case $(_os) in
|
case $(_os) in
|
||||||
macos) if [[ -z $DOCKER_HOST ]]; then
|
macos) if [[ -z $DOCKER_HOST ]]; then
|
||||||
|
@ -6,8 +12,5 @@ dk() {
|
||||||
;;
|
;;
|
||||||
arch) systemctl -q is-active docker || sudo systemctl start docker ;;
|
arch) systemctl -q is-active docker || sudo systemctl start docker ;;
|
||||||
esac
|
esac
|
||||||
sudo docker $@
|
docker $@
|
||||||
}; compdef dk=docker
|
}; compdef dk=docker
|
||||||
|
|
||||||
alias dkc=docker-compose
|
|
||||||
alias dkm=docker-machine
|
|
||||||
|
|
Loading…
Reference in a new issue