Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/compose/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func buildCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
flags.MarkHidden("progress") //nolint:errcheck
flags.BoolVar(&opts.print, "print", false, "Print equivalent bake file")
flags.BoolVar(&opts.check, "check", false, "Check build configuration")
flags.BoolVar(&opts.provenance, "provenance", true, "Generate provenance attestation for built images. Shorthand for `--attest=type=provenance`.")

return cmd
}
Expand All @@ -156,7 +157,6 @@ func runBuild(ctx context.Context, dockerCli command.Cli, backend api.Service, o
}

apiBuildOptions, err := opts.toAPIBuildOptions(services)
apiBuildOptions.Provenance = true
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions docs/reference/compose_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ run `docker compose build` to rebuild it.
| `-m`, `--memory` | `bytes` | `0` | Set memory limit for the build container. Not supported by BuildKit. |
| `--no-cache` | `bool` | | Do not use cache when building the image |
| `--print` | `bool` | | Print equivalent bake file |
| `--provenance` | `bool` | `true` | Generate provenance attestation for built images. Shorthand for `--attest=type=provenance`. |
| `--pull` | `bool` | | Always attempt to pull a newer version of the image |
| `--push` | `bool` | | Push service images |
| `-q`, `--quiet` | `bool` | | Don't print anything to STDOUT |
Expand Down
11 changes: 11 additions & 0 deletions docs/reference/docker_compose_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ options:
experimentalcli: false
kubernetes: false
swarm: false
- option: provenance
value_type: bool
default_value: "true"
description: |
Generate provenance attestation for built images. Shorthand for `--attest=type=provenance`.
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: pull
value_type: bool
default_value: "false"
Expand Down