policy: implement policy support for bake
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -236,6 +236,7 @@ The following table shows the complete list of attributes that you can assign to
|
||||
| [`no-cache-filter`](#targetno-cache-filter) | List | Disable build cache for specific stages |
|
||||
| [`no-cache`](#targetno-cache) | Boolean | Disable build cache completely |
|
||||
| [`output`](#targetoutput) | List | Output destinations |
|
||||
| [`policy`](#targetpolicy) | List | Policies to validate build sources and metadata |
|
||||
| [`platforms`](#targetplatforms) | List | Target platforms |
|
||||
| [`pull`](#targetpull) | Boolean | Always pull images |
|
||||
| [`secret`](#targetsecret) | List | Secrets to expose to the build |
|
||||
@@ -899,6 +900,21 @@ target "default" {
|
||||
}
|
||||
```
|
||||
|
||||
### `target.policy`
|
||||
|
||||
Policies to validate build sources and metadata. Each entry uses the same keys
|
||||
as the `--policy` flag for `docker buildx build` (`filename`, `reset`,
|
||||
`disabled`, `strict`, `log-level`). Bake also automatically loads
|
||||
`Dockerfile.rego` alongside the target Dockerfile when present.
|
||||
|
||||
```hcl
|
||||
target "default" {
|
||||
policy = [
|
||||
{ filename = "extra.rego" },
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### `target.platforms`
|
||||
|
||||
Set target platforms for the build target.
|
||||
|
||||
Reference in New Issue
Block a user