2017-12-25 11:18:30 -08:00
|
|
|
alias docker='sudo docker'
|
|
|
|
alias docker-compose='sudo docker-compose'
|
|
|
|
|
|
|
|
alias dkc=docker-compose
|
|
|
|
alias dkm=docker-machine
|
2018-02-22 16:16:08 -08:00
|
|
|
alias dkl='dk logs'
|
|
|
|
alias dkcl='dkc logs'
|
|
|
|
|
|
|
|
dkclr() {
|
|
|
|
dk stop $(docker ps -a -q)
|
|
|
|
dk rm $(docker ps -a -q)
|
|
|
|
}
|
|
|
|
|
|
|
|
dke() {
|
|
|
|
dk exec -it "$1" "${@:1}"
|
|
|
|
}
|
2017-12-25 11:18:30 -08:00
|
|
|
|
2017-12-05 22:39:10 -08:00
|
|
|
dk() {
|
2017-12-25 11:14:58 -08:00
|
|
|
case $(_os) in
|
2017-12-05 22:39:10 -08:00
|
|
|
macos) if [[ -z $DOCKER_HOST ]]; then
|
|
|
|
docker-machine start dev && eval $(docker-machine env)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
arch) systemctl -q is-active docker || sudo systemctl start docker ;;
|
|
|
|
esac
|
2017-12-25 11:18:30 -08:00
|
|
|
docker $@
|
2017-12-05 22:39:10 -08:00
|
|
|
}; compdef dk=docker
|