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
cmd/go: "error loading module requirements" from 'go mod download' #29213
Comments
Please mention the exact steps so that we can reproduce this at our end. What is the Dockerfile ? What is the repo ? Is there a go.mod ? This is what I get -
|
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Facing the same error |
I am also encountering this problem. |
Some more information would be awesome like:
This message is just not useful |
Yup I'm also getting this and it's unclear why... # =============================================================================
# build stage
#
# install golang dependencies & build binaries
# =============================================================================
FROM golang:1.12 AS build
# install golint for running rig tests
RUN go get golang.org/x/lint/golint
# set initial working directory
WORKDIR /app
# use go modules to install dependencies
COPY go.mod ./
COPY go.sum ./
RUN go mod download
# copy over the rest of our files
COPY internal ./internal
COPY . ./
# compile our application
RUN go build -ldflags="-s -w" -o /bin/app ./cmd/app
# =============================================================================
# application stage
#
# copy binary from build stage
# =============================================================================
FROM debian:stable-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY scripts/test /app/scripts/test
COPY static/ /app/static
COPY --from=build /bin/app /bin/
CMD ["/bin/app"] |
Ah, I cracked it. So
I simply had to move that symlink to a
|
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create an image docker
What did you expect to see?
an image
What did you see instead?
Step 6/10 : RUN go mod download
---> Running in 414efa3e565e
go: finding github.com/gorilla/mux v1.6.2
go: github.com/gorilla/mux@v1.6.2: unknown revision v1.6.2
go: error loading module requirements
The command '/bin/sh -c go mod download' returned a non-zero code: 1
The text was updated successfully, but these errors were encountered: