-
Notifications
You must be signed in to change notification settings - Fork 82
section08 user镜像构建问题 #13
Copy link
Copy link
Open
Description
原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 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"]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels