Browse Source

configure remote bind port via $BIND_PORT

Fabian Peter Hammerle 4 years ago
parent
commit
9d11518e92
3 changed files with 9 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 1
      Dockerfile
  3. 6 0
      README.md

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## [Unreleased]
 ### Added
 - `docker-compose.yml`
+- configure remote bind port via `$BIND_PORT`
 
 ### Changed
 - `COPY --chown` instead of `COPY` + `RUN`

+ 2 - 1
Dockerfile

@@ -14,4 +14,5 @@ COPY --chown=tunnel:nogroup known_hosts /home/tunnel/.ssh/known_hosts
 USER tunnel
 
 ENV BIND_ADDRESS bind-address
-CMD ssh -T -R $BIND_ADDRESS:22:$DOCKER_HOST_ADDRESS:22 serveo.net
+ENV BIND_PORT 22
+CMD ssh -T -R $BIND_ADDRESS:$BIND_PORT:$DOCKER_HOST_ADDRESS:22 serveo.net

+ 6 - 0
README.md

@@ -19,3 +19,9 @@ Forwarding SSH traffic from alias "host-alias"
 ```sh
 $ ssh -J serveo.net host-alias
 ```
+
+### change remote bind port
+
+```sh
+$ docker run -e BIND_PORT=2222 …
+```