forked from henkelmax/docker-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 748 Bytes
/
Dockerfile
File metadata and controls
28 lines (18 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM debian:buster-slim AS builder-base
WORKDIR /proxy/
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y -q && apt install -y -q g++ make libboost-all-dev dpkg-dev git
FROM builder-base AS proxy-builder
RUN git clone https://github.com/MengRao/TCP-UDP-Proxy.git .
RUN git config --global advice.detachedHead false
RUN git checkout 3c0ab60641886c48d223d408dcc81afa50b7a7be
RUN cd src && sed -i "s/\/usr\/local\/lib/\/usr\/lib\/x86_64-linux-gnu/" Makefile
RUN cd src && make
FROM debian:buster-slim
ENV LOCAL_PORT=0
ENV REMOTE_PORT=0
ENV REMOTE_IP=127.0.0.1
ENV PROTOCOL=udp
WORKDIR /proxy/
COPY --from=proxy-builder /root/proxy_server .
ENTRYPOINT echo "$PROTOCOL $LOCAL_PORT $REMOTE_IP $REMOTE_PORT" >> proxy.conf && ./proxy_server