You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM golang:latest
WORKDIR /root/micro-go-course/section10/user
COPY / /root/micro-go-course/section10/user
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go build -o user
ENTRYPOINT ["./user"]
问题:
xxxxx missing go.sum entry
解决方案:
Dockerfile加一行 go mod tidy,新Dockerfile如下:
FROM golang:latest
WORKDIR /root/micro-go-course/section10/user
COPY / /root/micro-go-course/section10/user
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod tidy
RUN go build -o user
ENTRYPOINT ["./user"]
The text was updated successfully, but these errors were encountered:
原Dockerfile:
问题:
xxxxx missing go.sum entry
解决方案:
Dockerfile加一行 go mod tidy,新Dockerfile如下:
The text was updated successfully, but these errors were encountered: