-
Notifications
You must be signed in to change notification settings - Fork 513
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
Missing package in 1.18 #415
Comments
I have an image that worked using
I assumed this was because |
I went back to 1.17.8 and confirmed that there's no |
Found the exact command in the image's go build --gcflags "all=-N -l" . a |
Here's a simple reproduction:
As it says, running It looks like the new VCS status embedding feature in go 1.18 requires git, and instead of silently skipping buildvcs when |
But that's impossible, the Go team knows that it's unacceptable to ever make a breaking change under any circumstances 🙄 More seriously it looks from that bottom comment like they're open to fixing this - but at any rate it's not an issue with this Docker image, but an upstream problem. I'll take it up with them. Thanks. |
If you really don't need |
@ocket8888, please consider re-opening this issue. There is a new std package in go 1.18, debug/buildinfo, which requires git in order to stamp the version control info on the binary (svn, hg, and bzr might be required too?). It's unfortunate that this may unnecessarily break some use cases (e.g. tests), but I think it's reasonable to expect that the official docker image should support the std packages of the language. |
No, the source directory is mounted as a volume, not loaded into the build context, so that's unfortunately not an option.
I'll re-open if you want, but for the record I think Go ought to walk this back instead. And they yet might. No idea how long that would be, though, or if 1.18.0 would ever see it anyway. |
See docker-library/golang#415 Signed-off-by: AKP <tom@tdpain.net>
The Go team is adding a |
It'll be great if VCS binaries are not a hard dependency of the go tool, but I still think they should still be present in the official golang 1.18+ images. |
They probably should be. Otherwise it's a feature of the tool for which the image is built that isn't directly supported by that image. Which is unusual. You could add |
The non-Alpine (Debian-based) images do contain all the tools -- they're Quoting again from the Alpine section of https://hub.docker.com/_/golang (https://github.com/docker-library/docs/tree/0b63293e37969498f85b48a9bcb5908993052ddc/golang#golangversion-alpine):
The Alpine variants exist specifically to be much smaller than the default base, not to be a full-featured 100% complete environment ready-for-use like the non-Alpine variants are. |
Fair enough. |
This improves cache hits and avoid this: docker-library/golang#415
(Closing per #415 (comment) ❤️) |
golang:1.17.8-alpine
came with thegit
executable - presumably to accommodatego get
- butgolang:1.18-alpine
does not - presumably because of the breaking change togo get
that accompanied the new version.The text was updated successfully, but these errors were encountered: