File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 5
5
# <build>
6
6
SOURCE_DATE_EPOCH=1700741054 \
7
7
docker buildx build --progress=plain \
8
- --provenance=mode=max \
8
+ --provenance=mode=max,builder-id= ' https://github.com/docker-library ' \
9
9
--output ' "type=oci","dest=temp.tar"' \
10
10
--annotation ' org.opencontainers.image.source=https://github.com/docker-library/docker.git#6d541d27b5dd12639e5a33a675ebca04d3837d74:24/cli' \
11
11
--annotation ' org.opencontainers.image.revision=6d541d27b5dd12639e5a33a675ebca04d3837d74' \
Original file line number Diff line number Diff line change @@ -151,6 +151,12 @@ def _sbom_subset:
151
151
]
152
152
;
153
153
154
+ # https://github.com/docker-library/meta-scripts/pull/61 (for lack of better documentation for setting this in buildkit)
155
+ # https://slsa.dev/provenance/v0.2#builder.id
156
+ def buildkit_provenance_builder_id :
157
+ "https://github.com/docker-library"
158
+ ;
159
+
154
160
# input: "build" object (with "buildId" top level key)
155
161
# output: boolean
156
162
def build_should_sbom :
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ def build_command:
141
141
@sh "SOURCE_DATE_EPOCH=\( .source.entry.SOURCE_DATE_EPOCH ) " ,
142
142
# TODO EXPERIMENTAL_BUILDKIT_SOURCE_POLICY=<(jq ...)
143
143
"docker buildx build --progress=plain" ,
144
- "--provenance=mode=max" ,
144
+ @sh "--provenance=mode=max,builder-id= \( buildkit_provenance_builder_id ) " ,
145
145
if build_should_sbom then
146
146
"--sbom=generator=\" $BASHBREW_BUILDKIT_SBOM_GENERATOR\" "
147
147
else empty end ,
You can’t perform that action at this time.
0 commit comments