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

阿里云docker编译失败 #11

Open
qindy opened this issue Dec 6, 2019 · 0 comments
Open

阿里云docker编译失败 #11

qindy opened this issue Dec 6, 2019 · 0 comments

Comments

@qindy
Copy link

qindy commented Dec 6, 2019

dockfile文件:
FROM golang as build

ENV GOPROXY=https://goproxy.io

ADD . /usr/local/go/src/giligili

WORKDIR /usr/local/go/src/giligili

RUN export GOPROXY=https://mirrors.aliyun.com/goproxy/
RUN export GO111MODULE=on
RUN go mod tidy
RUN go mod vendor

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o api_server

结果:go: inconsistent vendoring in /usr/local/go/src/giligili:
go.mod requires giligili but vendor/modules.txt does not include it.
run 'go mod tidy; go mod vendor' to sync

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