Skip to content

bake: global policy evaluation options#3832

Merged
tonistiigi merged 1 commit into
docker:masterfrom
crazy-max:bake-policy-flag
May 11, 2026
Merged

bake: global policy evaluation options#3832
tonistiigi merged 1 commit into
docker:masterfrom
crazy-max:bake-policy-flag

Conversation

@crazy-max
Copy link
Copy Markdown
Member

fixes #3821

This adds a global --policy flag to docker buildx bake for invocation-level policy evaluation options. The flag supports disabled, strict, and log-level, and it keeps policy file composition in the bake definition. The flag rejects filename and reset, because those change policy composition and belong in target.policy.

The requested --policy disabled=true behavior is useful as a global escape hatch for a bake invocation. Keeping filename and reset out of the flag avoids mixing bake definition logic into a top-level runtime option.

@crazy-max crazy-max requested a review from tonistiigi May 6, 2026 11:17
@crazy-max crazy-max added this to the v0.34.0 milestone May 6, 2026
@crazy-max crazy-max marked this pull request as ready for review May 6, 2026 11:17
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the bake-policy-flag branch from edfde4e to da8fa45 Compare May 7, 2026 09:12
@tonistiigi tonistiigi merged commit 5b40913 into docker:master May 11, 2026
162 checks passed
@crazy-max crazy-max deleted the bake-policy-flag branch May 11, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker bake doesn't accept --policy

2 participants