添加Dockerfile

This commit is contained in:
xing 2022-11-05 17:00:20 +08:00
parent 8b5424bdd2
commit 51e95a3e62

11
Dockerfile Normal file
View File

@ -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"]