-
Notifications
You must be signed in to change notification settings - Fork 606
Include git
or otherwise address "current commit information was not captured by the build: git was not found in the system: ..."
#482
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
Comments
Additional context: Unlike CI/CD environments like GitHub Actions where you could have an To work around the lack of |
The |
That does work, thank you for pointing it out. I guess there remains an open question of whether it's appropriate for the default to not include git, given the dependency on it added upstream. In other words: should 'docker' and 'docker:git' be made the same? |
I did some research to remember why I split these originally because I remember vaguely that it was effectively "because Git is big" but that didn't seem true anymore. Well, it turns out Git's size isn't the thing that changed (well, it did, but it's still in the same ballpark). The real justification could be more accurately stated as adding Git was a non-trivial increase in the total image size as compared to without it -- in other words, it's not that Git's smaller now, but rather that Docker (and buildx, compose, and now separated CLI/engine which used to be a single static binary) are now so much bigger than they used to be that 5 or even 10 MiB seems pitiful now. We added the Git variant in 2724961, at Docker 1.6.0. At the time, the base Alpine image was 2.5MB, the Docker binary (yes, singular) was 4.7MB, and Git+SSH was a whopping 8.8MB, so this seemed like a pretty reasonable line to draw ("the Git layer is bigger than the entire image without it, including the distro!"). Even the extra Fast forward to 2024 with Docker 25.0.3, and Alpine is 3.4MB, then we add SSH all the time now (7a67842, with some familiar echos in it) which is ~2MB when combined with In other words, golang/go#6853 😭 |
When looking through my (GitLab) build logs I ran into this and figured that #483 does not exactly solve this: it looks like this message requires the As an example, I set up a very minimal GitLab repo using a reduced version of GitLab's example Docker CI template to build a Hello World image. This results in the build reporting the aforementioned warning, which is not present when Therefore I was wondering:
Note: if this should be (re-)opened and/or discussed elsewhere, let me know! |
Oof, yep, looks like Git is indeed appropriate in both CLI and DinD now. 😞 Edit: sorry, to expand on that, but still in a terse way: |
When I use the
docker
image as a build step in Google Cloud Build to perform buildx builds, I get the following warning:I presume this has to do with provenance being enabled by default per https://docs.docker.com/build/attestations/slsa-provenance/#mode
I would like to be able to use the
docker
image to rundocker buildx ...
and have the provenance information captured as designed by the new default. I know about the option to suppress the warning by usingBUILDX_NO_DEFAULT_ATTESTATIONS=1
to disable the feature entirely, but I would prefer to get it working instead.As an end user I have no preference between what I presume are the two possible solutions:
git
as a child process.git
to thedocker
image.(I'm opening this issue here because I presume the second option is much more reasonable to implement.)
The text was updated successfully, but these errors were encountered: