-
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 gcc which is needed to make .test binaries. #153
Comments
Basically a duplicate of #119; specifically #119 (comment):
|
I disagree with the size vs. usefulness constraint on language/build containers. For runtime containers that makes perfect sense, but this is a language/tooling container. Also, there is not parity in tools needed across the different golang containers. |
I disagree with this statement. I believe many/most people would have a multi stage dockerfile in which they would build their binaries using golang:x.x.x-alpinex.x and run the built binary on a slim alpine:x.x. It feels to me that removing the tooling defeats the purpose here. |
See also #250 (comment), especially:
|
I am using |
Doing a It makes more sense to build using a more well supported distro and just copying into the slim version of that distro. Debian's slim distro is typically around 27MB which is less than the Not sure you can really get below 150MB for an image that compiles golang binaries. Alpine linux provides sort of a "false" benefit. If you're going for small you might as well use a scratch container and run just your binary. |
So gcc is needed to make test binaries, and I see in your Dockerfile that you delete it from a builddep dir.
Use case:
go test -i -c -o battery.test github.com/yaddayadda/pkg/battery
The standard golang container works ok, b/c the tooling is installed, but ideally I'd like to use the trim'd alpine containers.
The text was updated successfully, but these errors were encountered: