{"id":23999074,"url":"https://github.com/stocard/docker-gotthard","last_synced_at":"2026-05-15T17:03:33.314Z","repository":{"id":23291558,"uuid":"88178091","full_name":"Stocard/docker-gotthard","owner":"Stocard","description":"A container that exposes remote ports to your containers via ssh local forwarding","archived":false,"fork":false,"pushed_at":"2022-02-21T10:02:46.000Z","size":25,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-01-07T23:46:18.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stocard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-13T15:12:45.000Z","updated_at":"2022-02-18T14:44:32.000Z","dependencies_parsed_at":"2022-07-25T12:32:41.173Z","dependency_job_id":null,"html_url":"https://github.com/Stocard/docker-gotthard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stocard%2Fdocker-gotthard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stocard%2Fdocker-gotthard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stocard%2Fdocker-gotthard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stocard%2Fdocker-gotthard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stocard","download_url":"https://codeload.github.com/Stocard/docker-gotthard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240637118,"owners_count":19833006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-07T23:45:34.784Z","updated_at":"2026-05-15T17:03:28.258Z","avatar_url":"https://github.com/Stocard.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gotthard\n\nA container that exposes remote ports to your containers via ssh local forwarding.\nThe container will try to use all files in the **folder** that is mounted on `/root/.ssh/` to authenticate. \nMounting single files, will not work, as docker volume mounting only works on folders.\n\n:warning: If your SSH key requires a passphrase, please specify it using `SSH_KEY_PASSPHRASE` environment variable.\n\nIt is also possible to use jump hosts:\n* Specify the desired jump host(s) the following way (as value of `JUMP_HOSTS`): \n  * `JUMP_USER@JUMP_HOST`\n  * `JUMP_USER1@JUMP_HOST1,JUMP_USER2@JUMP_HOST2`\n\n## Examples\n\nSuppose we want to expose PORT 8080 and 8081 to the containers in our network.\n\n### bash:\n```\ndocker run \\\n  -v ~/.ssh/:/root/.ssh/ \\\n  -p 8080:8080 \\\n  -p 8081:8081 \\\n  -e USER=florian \\\n  -e JUMP_HOSTS=user1@my.jumphost.example.org,user3@my.other.jumphost.example.org\n  -e HOST=example.org \\\n  -e PORTS=80:8080,81:8081  \\\n  stocard/gotthard\n```\n\nSuppose we want to expose PORT 8080 and 8081 of `host my.endhost.example.org`, which is reachable \nby the host `example.org`, to the containers in our network.\n\n### bash:\n```\ndocker run \\\n  -v ~/.ssh/:/root/.ssh/ \\\n  -p 8080:8080 \\\n  -p 8081:8081 \\\n  -e USER=florian \\\n  -e JUMP_HOSTS=user1@my.jumphost.example.org,user3@my.other.jumphost.example.org\n  -e HOST=example.org \\\n  -e HOSTS_AND_PORTS=80:my.endhost.example.org:8080,81:my.endhost.example.org:8081  \\\n  stocard/gotthard\n```\n\nYou could also combine both approaches:\n\n```\ndocker run \\\n  -v ~/.ssh/:/root/.ssh/ \\\n  -p 8080:8080 \\\n  -p 8081:8081 \\\n  -e USER=florian \\\n  -e JUMP_HOSTS=user1@my.jumphost.example.org,user3@my.other.jumphost.example.org\n  -e HOST=example.org \\\n  -e PORTS=80:8080,81:8081  \\\n  -e HOSTS_AND_PORTS=82:my.endhost.example.org:8082,83:my.endhost.example.org:8083  \\\n  stocard/gotthard\n```\n\nThis forwards port 80 and 81 from the Host and 82 and 83 from `my.endhost.example.org`.\n\n\n### docker-compose:\n```\nservices:\n  (...)\n  gotthard:\n    image: stocard/gotthard\n    environment: \n      - USER=user\n      - HOST=example.org\n      - JUMP_HOSTS=user@my.jump_host.example.org\n      - PORTS=80:8080,81:8081\n    volumes:\n      - ~/.ssh/:/root/.ssh/\n```\n\nYour containers can now use `gotthard:80` or `gotthard:81` to talk to the remote server.\n\n```\nservices:\n  (...)\n  gotthard:\n    image: stocard/gotthard\n    environment: \n      - USER=user\n      - HOST=example.org\n      - JUMP_HOSTS=user@my.jump_host.example.org\n      - PORTS=80:8080,81:8081\n      - HOSTS_AND_PORTS=82:my.endhost.example.org:8082,83:my.endhost.example.org:8083\n    volumes:\n      - ~/.ssh/:/root/.ssh/\n```\n\nYour containers can now use `gotthard:80`, `gotthard:81`, `gotthard:82` or `gotthard:83` to talk to the remote server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocard%2Fdocker-gotthard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstocard%2Fdocker-gotthard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocard%2Fdocker-gotthard/lists"}