Skip to content

Commit

Permalink
master: Make debug level configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia Hai committed Jan 30, 2018
1 parent 5dd5574 commit 9961c47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
EXPOSE 1-65535
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
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.

0 comments on commit 9961c47

Please sign in to comment.