policy: verify BuildKit builder images
Extend the built-in policy to validate signed moby/buildkit release and floating tags before docker-container builders are created. Pull the image first, inspect it through Docker, and bind verification to the descriptor digest. Resolve signature attestations through the BuildKit API embedded in the Docker daemon. If pulling fails, use a local image while applying the same verification when the containerd image store exposes an immutable descriptor. Keep the classic image-store behavior unchanged because no descriptor is available. Allow unmanaged repositories and digest-only references unchanged. Add the allow-untrusted-image driver option as an explicit verification bypass. Document the behavior and add policy, digest-pinning, and local fallback coverage. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -173,6 +173,18 @@ documentation for the specific driver:
|
||||
* [`kubernetes` driver](https://docs.docker.com/build/builders/drivers/kubernetes/)
|
||||
* [`remote` driver](https://docs.docker.com/build/builders/drivers/remote/)
|
||||
|
||||
With `BUILDX_DEFAULT_POLICY=1`, the `docker-container` driver verifies signed
|
||||
`moby/buildkit` builder image tags before creating the builder. To explicitly
|
||||
bypass this verification, set `allow-untrusted-image=true`. For example:
|
||||
|
||||
```console
|
||||
$ BUILDX_DEFAULT_POLICY=1 docker buildx create --driver docker-container \
|
||||
--driver-opt allow-untrusted-image=true
|
||||
```
|
||||
|
||||
Only use this option for an image that you trust. It disables builder image
|
||||
verification for the new builder node.
|
||||
|
||||
### <a name="leave"></a> Remove a node from a builder (--leave)
|
||||
|
||||
The `--leave` flag changes the action of the command to remove a node from a
|
||||
|
||||
Reference in New Issue
Block a user