From f271e2a47e170ff6b7a1cbd9f4f83c86361c3184 Mon Sep 17 00:00:00 2001 From: mritd Date: Mon, 17 Dec 2018 11:41:57 +0800 Subject: [PATCH] chore(docker): add dockerfile add dockerfile refs riobard/go-shadowsocks2#25 Signed-off-by: mritd --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f41d4ce1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM golang:1.11.3-alpine3.8 AS builder + +RUN apk upgrade \ + && apk add git \ + && go get -ldflags '-w -s' \ + github.com/shadowsocks/go-shadowsocks2 + +FROM alpine:3.8 + +LABEL maintainer="mritd " + +RUN apk upgrade \ + && apk add bash tzdata \ + && rm -rf /var/cache/apk/* + +COPY --from=builder /go/bin/go-shadowsocks2 /usr/bin/shadowsocks + +ENTRYPOINT ["shadowsocks"]