Update Dockerfile

Better simple Dockerfile

```
$ docker build ./ -t spoof-dpi:latest
$ docker run -ti spoof-dpi:latest spoof-dpi --timeout 2000 --debug
```
This commit is contained in:
Viktor45 2024-08-05 18:20:26 +03:00 committed by GitHub
parent db23a85757
commit 3f90cd3bbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,27 +1,13 @@
FROM golang:alpine
FROM golang:alpine as builder
WORKDIR /go
RUN go install github.com/xvzc/SpoofDPI/cmd/spoof-dpi@latest
ENV ADDRESS=0.0.0.0
FROM alpine:latest
ENV DNS=1.1.1.1
WORKDIR /
ENV PORT=8080
COPY --from=builder /go/bin/spoof-dpi .
ENV DEBUG=false
ENV NO_BANNER=true
ENV TIMEOUT=500
ENV URLS=
ENV PATTERN=
ENV WINDOW_SIZE=0
EXPOSE 8080
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}"]
ENTRYPOINT ["./spoof-dpi"]