---
source: https://iinventedlight.com/library/notes/docker-build-provenance.md
title: "Attach SLSA provenance attestations to a Docker build"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker docs); Apache-2.0 (Buildx); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Docker docs, Provenance attestations; Buildx, buildx build reference. Apache-2.0; Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Docker Build provenance attestations"
tags: [docker, buildx, provenance, attestations, slsa]
client: Librarian
sources:
  - id: S1
    title: "Provenance attestations"
    publisher: Docker docs
    url: https://docs.docker.com/build/metadata/attestations/slsa-provenance/
    accessed: 2026-11-19
    license: "Apache-2.0"
  - id: S2
    title: "buildx build reference"
    publisher: Buildx
    url: https://raw.githubusercontent.com/docker/buildx/master/docs/reference/buildx_build.md
    accessed: 2026-11-19
    license: "Apache-2.0"
---
# Attach SLSA provenance attestations to a Docker build
**Answer:** Provenance attestations include facts about the build process. By default they follow the SLSA provenance schema, version 0.2. You can enable SLSA Provenance v1 with the `version` parameter. Pass `--attest type=provenance` to `docker buildx build`.

## What gets recorded

The facts can include build timestamps, build parameters and environment, version control metadata, source code details, and materials consumed during the build. You can use the `mode` parameter to define the level of detail. Supported values are `mode=min` (default) and `mode=max`. In `min` mode the attestation includes a smaller set, such as timestamps, the frontend, materials, the source repository and revision, and the build platform. Build argument values and secret identities stay out of `mode=min`, as does rich layer metadata.

## Buildx flags

The documentation also allows the shorthand `--provenance=true`. To specify `mode` or `version` with the shorthand, use a form such as `--provenance=mode=max,version=v1`. The Buildx `build` reference lists `--provenance` as a shorthand for `--attest=type=provenance`, and `--sbom` as a shorthand for `--attest=type=sbom`.

| --attest | --provenance |
|---|---|
| --attest type=provenance | Create a provenance attestation |
| --provenance | Shorthand for that attestation type |
| mode=min | Default, minimal set of information |
| mode=max | Higher level of detail |

## See also

- [docker-build-cache](https://iinventedlight.com/library/notes/docker-build-cache/)
- [docker-build-context](https://iinventedlight.com/library/notes/docker-build-context/)
- [docker-multi-stage-builds](https://iinventedlight.com/library/notes/docker-multi-stage-builds/)

## Claims

- id: C1
  claim: Default provenance attestations follow the SLSA provenance schema version 0.2.
  source: S1
  evidence: "provenance attestations follow the SLSA provenance schema"

- id: C2
  claim: You can create a provenance attestation with --attest type=provenance on buildx build.
  source: S1
  evidence: "pass the --attest type=provenance option"

- id: C3
  claim: Buildx documents --provenance as a shorthand for --attest=type=provenance.
  source: S2
  evidence: "Shorthand for `--attest=type=provenance`"

## Sources

- [S1] Provenance attestations. Docker docs. https://docs.docker.com/build/metadata/attestations/slsa-provenance/ . License: Apache-2.0. Accessed 2026-11-19.

- [S2] buildx build reference. Buildx. https://raw.githubusercontent.com/docker/buildx/master/docs/reference/buildx_build.md . License: Apache-2.0. Accessed 2026-11-19.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker docs, Provenance attestations; Buildx, buildx build reference. Apache-2.0; Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
