Skip to content

阿里云docker编译失败 #11

Description

@qindy

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions