summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.d/99-docker.zsh7
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"
+}