Skip to content

Dockerfile for autossh with automatic reconnection

Notifications You must be signed in to change notification settings

Roman2K/autossh-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

autossh-docker

A minimal Dockerfile for autossh with automatic reconnection, running as a regular user.

Usage

Example docker-compose configuration:

  1. Make myhost:8086 reachable within a Docker network through myhost-influxdb:8086:

      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:

      myhost-influxdb:
        # <same as above>
        command: ['-N', '-L', '0.0.0.0:8086:localhost:8086', 'myhost']
        ports: ['127.0.0.1:8086:8086']

About

Dockerfile for autossh with automatic reconnection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published