mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-07 00:21:56 +00:00
update doc
This commit is contained in:
parent
beea521043
commit
e6965f2f2b
@ -1,8 +1,26 @@
|
||||
# forward your traffic behind NAT etc.
|
||||
rpi-port-forward
|
||||
==========================
|
||||
Forward your traffic behind NAT etc.
|
||||
|
||||
```
|
||||
docker service create \
|
||||
--name socat \
|
||||
## Usage
|
||||
|
||||
Define the following environment variables to configure port-forwarding.
|
||||
|
||||
Variable | Description | Optional
|
||||
-------- | ----------- | --------
|
||||
REMOTE_HOST | IP or address of the host you want to forward traffic to | no
|
||||
REMOTE_PORT | Port on remote host to forward traffic to | yes (80)
|
||||
LOCAL_PORT | Port where container listens | yes (80)
|
||||
|
||||
The `socat` process within the container will listen by default to port 80, use `-p`docker
|
||||
flag to map the port of the local machine where it will listen to traffic to be forwarded.
|
||||
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
--name port-forward \
|
||||
-d \
|
||||
--restart always \
|
||||
--publish 81:80 \
|
||||
--ENV REMOTE_HOST=example.com \
|
||||
--ENV REMOTE_PORT=82 \
|
||||
@ -10,4 +28,4 @@ docker service create \
|
||||
newnius/rpi-port-forward
|
||||
```
|
||||
|
||||
Ref: [marcnuri/port-forward](https://hub.docker.com/r/marcnuri/port-forward/)
|
||||
Thanks to: [marcnuri/port-forward](https://hub.docker.com/r/marcnuri/port-forward/)
|
||||
|
Loading…
Reference in New Issue
Block a user