https://github.com/roman2k/autossh-docker
Dockerfile for autossh with automatic reconnection
https://github.com/roman2k/autossh-docker
Last synced: 3 months ago
JSON representation
Dockerfile for autossh with automatic reconnection
- Host: GitHub
- URL: https://github.com/roman2k/autossh-docker
- Owner: Roman2K
- Created: 2023-12-22T11:16:30.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-22T11:17:21.000Z (over 1 year ago)
- Last Synced: 2025-03-07T00:16:33.413Z (3 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# autossh-docker
A minimal Dockerfile for [autossh][autossh] with automatic reconnection, running
as a regular user.[autossh]: https://www.harding.motd.ca/autossh/
## Usage
Example docker-compose configuration:
1. Make `myhost:8086` reachable within a Docker network through
`myhost-influxdb:8086`:```yaml
myhost-influxdb:
image: autossh
volumes:
- type: bind
source: $HOME/.ssh/id_rsa
target: /home/app/.ssh/id_rsa
read_only: true
- type: bind
source: $HOME/.ssh/config
target: /home/app/.ssh/config
read_only: true
command: ['-N', '-L', '8086:localhost:8086', 'myhost']
```2. Or exposing `:8086` by the host:
```yaml
myhost-influxdb:
#
command: ['-N', '-L', '0.0.0.0:8086:localhost:8086', 'myhost']
ports: ['127.0.0.1:8086:8086']
```