A simple docker-machine replacement that take advantage of SSH socket forwarding.
docker run -d --restart=always -p 2377:22 \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v ~/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro \
--name docker-socket-tunnel teambun/docker-socket-tunnel
ssh -NTL /tmp/docker.sock:/var/run/docker.sock -p 2377 remote
unset DOCKER_TLS_VERIFY
export DOCKER_HOST=unix:///tmp/docker.sock
docker ps
dockertunnel-init user@remotedockertunnel user@remote docker psContent type
Image
Digest
Size
3.6 MB
Last updated
almost 8 years ago
docker pull teambun/docker-socket-tunnel