diff --git a/Dockerfile b/Dockerfile index 9b027cf..51cc43d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ RUN apk add --update openssh-client && rm -rf /var/cache/apk/* CMD rm -rf /root/.ssh && mkdir /root/.ssh && cp -R /root/ssh/* /root/.ssh/ && chmod -R 600 /root/.ssh/* && \ ssh \ --vv \ +$SSH_DEBUG \ -o StrictHostKeyChecking=no \ -N $TUNNEL_HOST \ -L *:$LOCAL_PORT:$REMOTE_HOST:$REMOTE_PORT \ && while true; do sleep 30; done; -EXPOSE 1-65535 \ No newline at end of file +EXPOSE 1-65535 diff --git a/README.md b/README.md index f551865..dddc71d 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ This Docker creates a simple SSH tunnel over a server. It is very useful when yo volumes: - $HOME/.ssh:/root/ssh:ro environment: + SSH_DEBUG: "-v" TUNNEL_HOST: mysql-tunnel REMOTE_HOST: tunneled-sql.corporate.internal.tld LOCAL_PORT: 3306 @@ -42,4 +43,4 @@ This Docker creates a simple SSH tunnel over a server. It is very useful when yo 5. Run `docker-compose up -d` -After you start up docker containers, any container in the same network will be able to access to tunneled mysql instance using ```tcp://mysql:3306```. Of course you can also expose port 3306 to be able to access to tunneled resource from your host machine. \ No newline at end of file +After you start up docker containers, any container in the same network will be able to access to tunneled mysql instance using ```tcp://mysql:3306```. Of course you can also expose port 3306 to be able to access to tunneled resource from your host machine.