Skip to content

Instantly share code, notes, and snippets.

@ianchen06
Created October 25, 2017 05:38
Show Gist options
  • Save ianchen06/7d8cf8d0f9d357d69a0f78bcb087177c to your computer and use it in GitHub Desktop.
Save ianchen06/7d8cf8d0f9d357d69a0f78bcb087177c to your computer and use it in GitHub Desktop.
Tunnel to docker port from remote
#!/bin/sh
set -e
[email protected]
ssh -fNTL localhost:8080:$(ssh $REMOTE "docker inspect --format \
'{{ .NetworkSettings.IPAddress }}' some-rethink"):8080 $REMOTE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment