2021-11-25 10:09:24 +08:00
|
|
|
FROM golang:latest
|
|
|
|
ENV GOPROXY https://goproxy.cn,direct
|
2021-11-25 14:30:32 +08:00
|
|
|
WORKDIR /app
|
2021-11-25 14:42:16 +08:00
|
|
|
ADD main.go /app
|
|
|
|
RUN go env -w $GO111MODULE=on
|
|
|
|
RUN go env -w $GOPROXY=https://goproxy.cn,direct
|
2021-11-25 11:19:07 +08:00
|
|
|
RUN go mod tidy
|
2021-11-25 14:30:32 +08:00
|
|
|
RUN go build .
|
2021-11-25 10:09:24 +08:00
|
|
|
EXPOSE 9090
|
2021-11-25 14:42:16 +08:00
|
|
|
ENTRYPOINT ["go run ./main.go"]
|