Skip to content

Include git or otherwise address "current commit information was not captured by the build: git was not found in the system: ..." #482

Closed
@eriksw

Description

@eriksw

When I use the docker image as a build step in Google Cloud Build to perform buildx builds, I get the following warning:

WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH

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 run docker buildx ... and have the provenance information captured as designed by the new default. I know about the option to suppress the warning by using BUILDX_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:

  1. Modify the provenance feature to extract the required information without running git as a child process.
  2. Add git to the docker image.

(I'm opening this issue here because I presume the second option is much more reasonable to implement.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions