From 51e95a3e62db00c8d0c9b2f369e22bef79070fc6 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 5 Nov 2022 17:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..20df9f0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:latest +COPY ./ /go/src/wp-go +WORKDIR /go/src/wp-go +#ENV GOPROXY="https://goproxy.cn" +#ENV CGO=0 +RUN go build -tags netgo + +FROM alpine:latest +WORKDIR /opt/wp-go +COPY --from=0 /go/src/wp-go/wp-go ./ +ENTRYPOINT ["./wp-go"] \ No newline at end of file