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 15:05:58 +08:00
|
|
|
COPY . .
|
2021-11-25 14:47:35 +08:00
|
|
|
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 15:05:58 +08:00
|
|
|
RUN go build -o mains .
|
2021-11-26 15:02:39 +08:00
|
|
|
EXPOSE 51002
|
2021-11-25 15:05:58 +08:00
|
|
|
ENTRYPOINT ["./mains"]
|