Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

section08 user镜像构建问题 #13

Open
onedayherocoming opened this issue Sep 13, 2021 · 0 comments
Open

section08 user镜像构建问题 #13

onedayherocoming opened this issue Sep 13, 2021 · 0 comments

Comments

@onedayherocoming
Copy link

onedayherocoming commented Sep 13, 2021

原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"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant