docker-library / golang

Docker Official Image packaging for golang
https://golang.org
BSD 3-Clause "New" or "Revised" License
1.48k stars 510 forks source link

Failed to get some modules when using arm64 images #484

Closed chuanhhoang closed 9 months ago

chuanhhoang commented 1 year ago

Building a simple image with this simple Dockerfile:

FROM arm64v8/golang:1.20

WORKDIR /workdir

COPY go.mod ./
RUN go get github.com/aws/aws-sdk-go

I faced this error:

0.379 go: downloading github.com/aws/aws-sdk-go v1.44.322
0.523 go: github.com/aws/aws-sdk-go@v1.44.322: reading https://proxy.golang.org/github.com/aws/aws-sdk-go/@v/v1.44.322.zip: 403 Forbidden

Running go get github.com/aws/aws-sdk-go on the host works just fine.

tianon commented 9 months ago

Unfortunately, I'm not sure how this could be something specific to the image -- it's most likely the proxy itself had a hiccup (or something strange in your network setup, but that's less likely given that the URL is https and thus should've been verified during connection).