Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sigwinhq/docker-ssh-tunnel
Use SSH tunnelling (AKA port forwarding) within your Docker environment to allow your containers to access remote firewalled services by accessing them via known public IPs.
https://github.com/sigwinhq/docker-ssh-tunnel
docker docker-compose docker-image
Last synced: 22 days ago
JSON representation
Use SSH tunnelling (AKA port forwarding) within your Docker environment to allow your containers to access remote firewalled services by accessing them via known public IPs.
- Host: GitHub
- URL: https://github.com/sigwinhq/docker-ssh-tunnel
- Owner: sigwinhq
- Created: 2021-06-03T09:19:03.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-03T09:42:43.000Z (over 3 years ago)
- Last Synced: 2024-11-06T12:33:17.081Z (2 months ago)
- Topics: docker, docker-compose, docker-image
- Language: Dockerfile
- Homepage:
- Size: 1000 Bytes
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSH tunnel in Docker
Use case: allow your Docker containers to use SSH tunnels
to get into those hard to reach places like corporate resources,
firewalled APIs etc.## Usage with Docker Compose
```yaml
services:
# your reglar services
ssh-tunnel:
image: sigwinhq/ssh-tunnel:latest
environment:
# if the key is password-protected
SSH_AUTH_SOCK: "/ssh-agent"
# the host via which we tunnel
TUNNEL_HOST: "[email protected]"
# what do we want to proxy to?
FORWARD_DSN: "*:443:firewalled-api.example.com:443"
volumes:
# your key is now usable by the tunnel
- $HOME/.ssh:/root/ssh:ro
# if the key is password-protected
- $SSH_AUTH_SOCK:/ssh-agent
# this part is to make the tunnel transparent to others
networks:
default:
aliases:
- firewalled-api.example.com
```After doing this, your other services should now have access
to the firewalled API as if it's available directly,
without even knowing about the proxy.