Skip to content

Commit a547f09

Browse files
committed
[build] add attestations to Docker image
This PR adds the possibility to add the software bill or materials (SBOM) and provenance attestations to the Docker images built by exist-docker. mvn clean package \ -Pdocker,skip-build-dist-archives \ -Ddocker.sbom=true -Ddocker.provenance=true NOTE: In order to build multiplatform images with attestations you will have to use containerd for storage. This is why these attestations are not added by default.
1 parent 9057c82 commit a547f09

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

exist-docker/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
<docker.tag>latest</docker.tag>
5454
<docker.debug.tag>debug</docker.debug.tag>
5555
<docker.platforms>linux/amd64, linux/arm64</docker.platforms>
56+
<docker.sbom>false</docker.sbom>
57+
<docker.provenance>false</docker.provenance>
5658
</properties>
5759

5860
<dependencies>
@@ -234,6 +236,10 @@
234236
<platforms>
235237
<platform>${docker.platforms}</platform>
236238
</platforms>
239+
<attestations>
240+
<provenance>${docker.provenance}</provenance>
241+
<sbom>${docker.sbom}</sbom>
242+
</attestations>
237243
</buildx>
238244
<tags>
239245
<tag>${docker.tag}</tag>
@@ -251,6 +257,10 @@
251257
<platforms>
252258
<platform>${docker.platforms}</platform>
253259
</platforms>
260+
<attestations>
261+
<provenance>${docker.provenance}</provenance>
262+
<sbom>${docker.sbom}</sbom>
263+
</attestations>
254264
</buildx>
255265
<tags>
256266
<tag>${docker.debug.tag}</tag>

0 commit comments

Comments
 (0)