Skip to content

docker bake doesn't accept --policy #3821

@ktchen14

Description

@ktchen14

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I'd like to bake all targets with a common policy. The documentation:

https://docs.docker.com/build/policies/usage/#bake-with-policy-options

Seems to indicate that this is done with:

docker buildx bake --policy disabled=true production

However, bake doesn't accept --policy and there appears to be no such flag in the code.

Either the documentation should be changed to reflect this, or --policy should be added to bake.

Expected behaviour

bake accepts --policy

Actual behaviour

bake doesn't accept --policy

Buildx version

github.com/docker/buildx v0.33.0-desktop.1 7f91f038ac14cbf5c4b2a6b76470860814424da1

Docker info


Builders list

NAME/NODE           DRIVER/ENDPOINT     STATUS    BUILDKIT   PLATFORMS
default             docker
 \_ default          \_ default         running   v0.29.0    linux/amd64 (+2), linux/arm64, linux/ppc64le, linux/s390x, (2 more)
desktop-linux*      docker
 \_ desktop-linux    \_ desktop-linux   running   v0.29.0    linux/amd64 (+2), linux/arm64, linux/ppc64le, linux/s390x, (2 more)

Configuration

N/A

Build logs


Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions