diff --git a/README.md b/README.md index 941ffff7..0c736d43 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,25 @@ Usage See on [tmate.io](http://tmate.io/). +Docker image +----------- + +A docker image is provided: +[`tmate/tmate-ssh-server`](https://hub.docker.com/r/tmate/tmate-ssh-server) + +The following environment variables are used to configure the server: + +* `SSH_KEYS_PATH` (mandatory): The path where the ssh keys are located. +* `HAS_WEBSOCKET`: set to `1` if the tmate-websocket server exists (for HTML5 + clients). +* `USE_PROXY_PROTOCOL`: set to `1` if the ssh server is behind a load balancer + that uses the [proxy protocol](http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) enabled. + This is useful to get client real IPs. +* `SSH_HOSTNAME`: configures the SSH hostname to advertise to tmate hosts. +* `SSH_PORT_LISTEN`: port on which the SSH server should listen on. +* `SSH_PORT_ADVERTISE`: configures the SSH port to advertise to tmate hosts. + Defaults to `SSH_PORT_LISTEN`. + License -------- diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 2f1f7c1e..85f8e738 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,5 +15,6 @@ fi SSH_PORT_LISTEN=${SSH_PORT_LISTEN:-2200} SSH_PORT_ADVERTIZE=${SSH_PORT_ADVERTIZE:-${SSH_PORT_LISTEN}} +SSH_PORT_ADVERTISE=${SSH_PORT_ADVERTISE:-${SSH_PORT_ADVERTIZE}} -exec tmate-ssh-server -p ${SSH_PORT_LISTEN} -q ${SSH_PORT_ADVERTIZE} -k ${SSH_KEYS_PATH} "$@" +exec tmate-ssh-server -p ${SSH_PORT_LISTEN} -q ${SSH_PORT_ADVERTISE} -k ${SSH_KEYS_PATH} "$@"