Skip to content

Commit 6c562d5

Browse files
committed
badges links in readme, docker run usage block
1 parent fe1e269 commit 6c562d5

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

README.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
# Docker SSH tunnel
33

4-
![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/symfonydoge/docker-ssh-tunnel)
5-
![Docker Pulls](https://img.shields.io/docker/pulls/symfonydoge/docker-ssh-tunnel)
6-
![Docker Stars](https://img.shields.io/docker/stars/symfonydoge/docker-ssh-tunnel)
4+
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/symfonydoge/docker-ssh-tunnel)](https://hub.docker.com/r/symfonydoge/docker-ssh-tunnel/builds)
5+
[![Docker Pulls](https://img.shields.io/docker/pulls/symfonydoge/docker-ssh-tunnel)](https://hub.docker.com/r/symfonydoge/docker-ssh-tunnel)
6+
[![Docker Stars](https://img.shields.io/docker/stars/symfonydoge/docker-ssh-tunnel)](https://hub.docker.com/r/symfonydoge/docker-ssh-tunnel)
77

88
This docker image can be used in case when you need
99
an access, for example, to some service on your production server,
@@ -13,8 +13,6 @@ because some of them can be busy or just reserved.
1313

1414
## Usage
1515

16-
### docker run
17-
1816
### docker-compose.yml
1917

2018
The minimal configuration will look like:
@@ -39,6 +37,25 @@ see full list of environment variables below).
3937
Now each container in the compose project can access
4038
tunnelled resource through `ssh-tunnel-example:6379`.
4139

40+
### docker run
41+
42+
This image mostly handy to use with compose tools like docker-compose
43+
as an automation of port forwarding routine within docker network.
44+
But no one can stop you (ouh) to use it directly
45+
to make some ports of your host machine dirty,
46+
here comes a snippet:
47+
48+
```
49+
docker run \
50+
--name "ssh-tunnel-example" \
51+
--rm \
52+
-p 6379:6379 \
53+
-v "$HOME/.ssh/id_rsa:/root/ssh-import/id_rsa:ro" \
54+
-e "SSH_TUNNEL_HOST=corp.domain.ltd" \
55+
-e "REMOTE_PORT=6379" \
56+
-d symfonydoge/docker-ssh-tunnel
57+
```
58+
4259
## Environment Variables
4360

4461
| Name | Default value | Description |

0 commit comments

Comments
 (0)