forked from synfinatic/udp-proxy-2020
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (22 loc) · 706 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (22 loc) · 706 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
FROM golang:1.16-alpine as builder
ARG VERSION
# base applications
RUN apk add --update git build-base libpcap libpcap-dev && \
mkdir udp-proxy-2020
COPY . udp-proxy-2020/
RUN cd udp-proxy-2020 && \
DOCKER_VERSION=${VERSION} make .docker && \
mkdir -p /usr/local/bin && \
cp dist/udp-proxy-2020 /usr/local/bin/udp-proxy-2020
FROM alpine
RUN apk add --update libpcap && \
mkdir -p /usr/local/bin
COPY --from=builder /usr/local/bin/udp-proxy-2020 /usr/local/bin/
ENV PORTS=9003
ENV INTERFACES=""
ENV TIMEOUT=250
ENV CACHETTL=90
ENV EXTRA_ARGS=""
CMD /usr/local/bin/udp-proxy-2020 --port $PORTS \
--interface $INTERFACES --timeout $TIMEOUT \
--cache-ttl $CACHETTL $EXTRA_ARGS