From 991e95330ce5edfcfe61a7c2873ce2e09798899a Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Wed, 23 Jun 2021 12:46:12 +0300 Subject: [PATCH] add dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e572829 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang AS build + +ARG GIT_DESC=undefined + +WORKDIR /go/src/github.com/Snawoot/windscribe-proxy +COPY . . +RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC" +ADD https://curl.haxx.se/ca/cacert.pem /certs.crt +RUN chmod 0644 /certs.crt + +FROM scratch AS arrange +COPY --from=build /go/src/github.com/Snawoot/windscribe-proxy/windscribe-proxy / +COPY --from=build /certs.crt /etc/ssl/certs/ca-certificates.crt + +FROM scratch +COPY --from=arrange / / +USER 9999:9999 +EXPOSE 18080/tcp +ENTRYPOINT ["/windscribe-proxy", "-bind-address", "0.0.0.0:28080"]