2021-11-25 10:09:24 +08:00
|
|
|
FROM golang:latest
|
|
|
|
ENV GOPROXY https://goproxy.cn,direct
|
|
|
|
WORKDIR /home/esg_report_backend
|
|
|
|
COPY . .
|
2021-11-25 11:08:03 +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 10:09:24 +08:00
|
|
|
RUN go build -o app .
|
|
|
|
WORKDIR /dist
|
|
|
|
RUN cp /home/esg_report_backend
|
|
|
|
EXPOSE 9090
|
2021-11-25 10:46:03 +08:00
|
|
|
ENTRYPOINT ["/dist/app"]
|