Skip to content

YIIZ/docker-socket-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Docker Socket Tunnel

A simple docker-machine replacement that take advantage of SSH socket forwarding.

Usage (by manual)

  1. Deploy this on remote machine
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
  1. Forward Docker socket
ssh -NTL /tmp/docker.sock:/var/run/docker.sock -p 2377 remote
  1. Connect to remote docker
unset DOCKER_TLS_VERIFY
export DOCKER_HOST=unix:///tmp/docker.sock

docker ps

Usage (by scripts)

  1. Get scripts
  2. Deploy this to remote machine: dockertunnel-init user@remote
  3. Run docker client: dockertunnel user@remote docker ps

About

A simple docker-machine replacement that take advantage of SSH socket forwarding.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published