Skip to content

bake: global policy evaluation options#3832

Open
crazy-max wants to merge 1 commit intodocker:masterfrom
crazy-max:bake-policy-flag
Open

bake: global policy evaluation options#3832
crazy-max wants to merge 1 commit intodocker: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
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

1 participant