mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-13 09:36:44 +00:00
add port forwarder
This commit is contained in:
13
port-forward/Dockerfile
Normal file
13
port-forward/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM alpine:3.8
|
||||
|
||||
MAINTAINER Newnius <docker@newnius.com>
|
||||
|
||||
ARG DEF_REMOTE_PORT=80
|
||||
ARG DEF_LOCAL_PORT=80
|
||||
|
||||
ENV REMOTE_PORT=$DEF_REMOTE_PORT
|
||||
ENV LOCAL_PORT=$DEF_LOCAL_PORT
|
||||
|
||||
RUN apk add --no-cache socat
|
||||
|
||||
CMD socat tcp-listen:$LOCAL_PORT,reuseaddr,fork tcp:$REMOTE_HOST:$REMOTE_PORT
|
||||
Reference in New Issue
Block a user