mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-12-15 10:26:44 +00:00
add rpi-port-forward
This commit is contained in:
13
rpi-port-forward/Dockerfile
Normal file
13
rpi-port-forward/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM hypriot/rpi-alpine-scratch:v3.4
|
||||
|
||||
MAINTAINER Newnius <newnius.cn@gmail.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