Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kconde2/63a567958b7993686d20a323987fdaf3 to your computer and use it in GitHub Desktop.
Save kconde2/63a567958b7993686d20a323987fdaf3 to your computer and use it in GitHub Desktop.
SSH tunnel to remote host socket
ssh -fNT -L /tmp/remote-docker.sock:/var/run/docker.sock <remote-user>@<host-ip>
Map localhost docker host to ssh tunnel
export DOCKER_HOST=unix:///tmp/remote-docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment