Skip to content

Commit 3f90cd3

Browse files
authored
Update Dockerfile
Better simple Dockerfile ``` $ docker build ./ -t spoof-dpi:latest $ docker run -ti spoof-dpi:latest spoof-dpi --timeout 2000 --debug ```
1 parent db23a85 commit 3f90cd3

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

Dockerfile

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1-
FROM golang:alpine
1+
FROM golang:alpine as builder
22

33
WORKDIR /go
44

55
RUN go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest
66

7-
ENV ADDRESS=0.0.0.0
7+
FROM alpine:latest
88

9-
ENV DNS=1.1.1.1
9+
WORKDIR /
1010

11-
ENV PORT=8080
11+
COPY --from=builder /go/bin/spoof-dpi .
1212

13-
ENV DEBUG=false
14-
15-
ENV NO_BANNER=true
16-
17-
ENV TIMEOUT=500
18-
19-
ENV URLS=
20-
21-
ENV PATTERN=
22-
23-
ENV WINDOW_SIZE=0
24-
25-
EXPOSE 8080
26-
27-
CMD ["/bin/sh", "-c", "/go/bin/spoof-dpi -addr=${ADDRESS} -debug=${DEBUG} -dns-addr=${DNS} -port=${PORT} -no-banner=${NO_BANNER} -timeout=${TIMEOUT} -window-size=${WINDOW_SIZE} $(echo \"${URLS}\" | tr -d ' ' | tr ',' '\n' | sed -e 's/^/-url=/') -pattern ${PATTERN}"]
13+
ENTRYPOINT ["./spoof-dpi"]

0 commit comments

Comments
 (0)