Closed chradcliffe closed 10 months ago
I think this is related to the fact that only go 1.21+ has binaries that work correctly on Alpine. (https://github.com/docker-library/golang/pull/474).
So if I understand correctly:
golang:alpine
was compiled from source because of cgo, but now 1.21 compiles without cgo, so the image uses the prebuilt official golang release.golang:alpine
won't work because those toolchains depend on cgoIs that correct?
That is correct; the upstream binary releases of 1.20.x don't work on Alpine.
That makes sense. Thank you for the clarification.
The
go
command ingolang:alpine
doesn't seem to be able to find the path to the Go toolchain downloaded when specifyingGOTOOLCHAIN
:The same command works just fine in
golang:latest
:Is there something different about the PATH variable in golang:alpine that is causing issues here maybe?