From 0a24af10e61241c24c22069d33c1893c9a516686 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 5 Jun 2017 18:03:05 +0200 Subject: Add docker socket adoption --- conf.d/99-docker.zsh | 7 +++++++ 1 file changed, 7 insertions(+) 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" +} -- cgit v1.2.3