diff options
author | Till Höppner | 2017-06-05 18:03:05 +0200 |
---|---|---|
committer | Till Höppner | 2017-06-05 18:03:05 +0200 |
commit | 0a24af10e61241c24c22069d33c1893c9a516686 (patch) | |
tree | 26f93257cfb068f5cd159f27886c28c091d0fded | |
parent | 2dd9c16de15f01802a99f15f30722e4f3ffeab63 (diff) | |
download | zsh-0a24af10e61241c24c22069d33c1893c9a516686.tar.gz zsh-0a24af10e61241c24c22069d33c1893c9a516686.tar.xz zsh-0a24af10e61241c24c22069d33c1893c9a516686.zip |
Add docker socket adoption
-rw-r--r-- | conf.d/99-docker.zsh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/conf.d/99-docker.zsh b/conf.d/99-docker.zsh index 46c3de2..3ff8aa4 100644 --- a/conf.d/99-docker.zsh +++ b/conf.d/99-docker.zsh @@ -5,3 +5,10 @@ alias dm=docker-machine alias dtop='d stats $(d ps --format={{.Names}})' alias ctop='d run -it --name ctop --rm -v /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop:latest' alias dlog='d logs --follow --timestamps --tail=10000' + +dadopt() { + local remote="$1" + local sock="/tmp/$remote.sock" + ssh -nNT -L "$sock:/var/run/docker.sock" "$remote" & + export DOCKER_HOST="unix://$sock" +} |