Skip to content

Commit 83d589d

Browse files
authored
build attributes (#23149)
<!--Delete sections as needed --> ## Description https://github.com/docker/docs/pull/23148/files ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review
1 parent 8e06937 commit 83d589d

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

content/manuals/compose/releases/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more detailed information, see the [release notes in the Compose repo](https
2323

2424
- Added `--models` flag to `config` command to list models
2525
- Added `--since` and `--until` flags to `events`
26-
- Introduced `provenance` and `sbom` attributes to `develop` section
26+
- Introduced `provenance` and `sbom` attributes to `build` section
2727
- Fixed `bridge convert` issue on Windows
2828
- Fixed multiple issues with `bake` builds
2929

content/reference/compose-file/build.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,52 @@ build:
424424
privileged: true
425425
```
426426

427+
### `provenance`
428+
429+
{{< summary-bar feature_name="Compose provenance" >}}
430+
431+
`provenance` configures the builder to add a [provenance attestation](https://slsa.dev/provenance/v0.2#schema) to the published image.
432+
433+
The value can be either a boolean to enable/disable provenance attestation, or a key=value string to set provenance configuration. You can
434+
use this to select the level of detail to be included in the provenance attestation by setting the `mode` parameter.
435+
436+
```yaml
437+
build:
438+
context: .
439+
provenance: true
440+
```
441+
442+
```yaml
443+
build:
444+
context: .
445+
provenance: mode=max
446+
```
447+
427448
### `pull`
428449

429450
`pull` requires the image builder to pull referenced images (`FROM` Dockerfile directive), even if those are already
430451
available in the local image store.
431452

453+
### `sbom`
454+
455+
{{< summary-bar feature_name="Compose sbom" >}}
456+
457+
`sbom` configures the builder to add a [provenance attestation](https://slsa.dev/provenance/v0.2#schema) to the published image.
458+
The value can be either a boolean to enable/disable sbom attestation, or a key=value string to set SBOM generator configuration. This let you
459+
select an alternative SBOM generator image (see https://github.com/moby/buildkit/blob/master/docs/attestations/sbom-protocol.md)
460+
461+
```yaml
462+
build:
463+
context: .
464+
sbom: true
465+
```
466+
467+
```yaml
468+
build:
469+
context: .
470+
sbom: generator=docker/scout-sbom-indexer:latest # Use an alternative SBOM generator
471+
```
472+
432473
### `secrets`
433474

434475
`secrets` grants access to sensitive data defined by [secrets](services.md#secrets) on a per-service build basis. Two

data/summary.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@ Compose post start:
125125
requires: Docker Compose [2.30.0](/manuals/compose/releases/release-notes.md#2300) and later
126126
Compose pre stop:
127127
requires: Docker Compose [2.30.0](/manuals/compose/releases/release-notes.md#2300) and later
128+
Compose provenance:
129+
requires: Docker Compose [2.39.0](/manuals/compose/releases/release-notes.md#2390) and later
128130
Compose uts:
129131
requires: Docker Compose [2.15.1](/manuals/compose/releases/release-notes.md#2151) and later
130132
Composefile include:
131133
requires: Docker Compose [2.20.0](/manuals/compose/releases/release-notes.md#2200) and later
134+
Compose sbom:
135+
requires: Docker Compose [2.39.0](/manuals/compose/releases/release-notes.md#2390) and later
132136
containerd:
133137
availability: Experimental
134138
Dev Environments:

0 commit comments

Comments
 (0)