-
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
Adds Git #345
Adds Git #345
Conversation
Huh, interesting. We use |
Are the working projects using |
Yes, they are; we're exclusively using
This is pulling a local dependency, obviously, so that may explain why we're seeing this. |
Yeah, that sounds like it's probably the case! For running |
That they are. Hm, I'll have to play with this a bit to confirm. But this still strikes me as a basic functionality add of the Go language. I mean, if the argument is that we can just install git in our own 2 liner Dockerfile that FROM's this image because adding git is undue burden from this project's side of things (or from inside the CI job), then couldn't the argument be made that installing Go is also undue burden? 😄 Not trying to come across as crass, just trying to understand the philosophy there. |
Also, sorry for creating a dupe PR 😄 |
We tend to prefer using alpine-based images for our CI, because they are smaller, and thus load faster. We've not run into this particular issue before because we don't have very much go code within the company yet, but the image not having a known dependency of go definitely violated the principle of least surprise for me. We have ways of working around this internally--basically, adding |
The point is not "undue burden" but rather "unnecessary size" (which then cannot be reclaimed by image users). I think #250 (comment) phrases this better than I could rephrase again. 😅 (That note about Alpine being entirely unsupported/unmaintained in the Go ecosystem has also since been documented in our image description via docker-library/docs#1749) |
True; what this means is that you prioritize what is necessary, which you have done. I'm simply arguing that git is necessary in some cases :)
Interesting. I do have to point out that that comment is not accurate; the alpine image does indeed include both bash and gcc; it's just missing git. |
That's fair.. FTR, I still think this is a pretty simple value add, even if it adds a few MB to the image. But I will defer to your opinion that since git may not, under every circumstance, be necessary (even if IMO common) then it should not be added. |
@tianon just wanted to revist this PR since I see it's still open. Wanted to make the point that for the debian variants of this image, the template in this repo is specifying Looking at the documentation for that buildpack-deps image: https://hub.docker.com/_/buildpack-deps
Pulling some sample image tags to my local, I can see that |
The default (Debian) image tags target convenience -- see, for example, In contrast, the Alpine image tags almost always target size (because that's typically the main reason folks choose Alpine in the first place), and for many uses of Go, (In other words, I definitely still stand by #250 (comment).) |
This is a fair point. Though there's something like a 500MB difference between the alpine and debian image variants... Asking someone that needs git to have their CI download 500 extra MB because they want git is a pretty tall order. On the flipside, installing git for every CI job that needs it is also tedious and a tall order in its own way. To counterpoint, is it always necessary for a golang image to contain ca-certificates and openssl? Bash? |
In the case of |
Also, we're suggesting that users who want a supported installation of Go download those additional 500MB, not just folks who want |
Closing old issue; since our goal for This is documented on the Docker Hub description about the
|
It appears the upstream alpine image stopped baking git in their image which is essential for
go get
. This PR simply re-adds functionality that was lost from upstream alpine.