Merge pull request #3962 from crazy-max/bake-secret-source-override

bake: allow overriding declared secret sources
This commit is contained in:
CrazyMax
2026-07-22 14:36:50 +02:00
committed by GitHub
5 changed files with 152 additions and 7 deletions
+8
View File
@@ -1006,6 +1006,14 @@ RUN --mount=type=secret,id=KUBECONFIG,env=KUBECONFIG \
helm upgrade --install
```
You can override the source for an existing secret without changing the target's
secret IDs. The secret must already be declared by the target.
```console
$ docker buildx bake --set default.secret.aws=env=AWS_CREDENTIALS
$ docker buildx bake --set default.secret.KUBECONFIG=src=/path/to/kubeconfig
```
### `target.shm-size`
Sets the size of the shared memory allocated for build containers when using
+2
View File
@@ -441,6 +441,7 @@ $ docker buildx bake --set foo*.no-cache # bypass caching only fo
$ docker buildx bake --set target.platform+=linux/arm64 # appends 'linux/arm64' to the platform list
$ docker buildx bake --set target.contexts.bar=../bar # overrides 'bar' named context
$ docker buildx bake --set target.resources.memory=2g # overrides memory resource limit
$ docker buildx bake --set target.secret.aws=env=AWS # overrides source for an existing secret
```
> [!NOTE]
@@ -472,6 +473,7 @@ You can override the following fields:
* `pull`
* `push`
* `resources`
* `secret.<id>`
* `secrets`
* `ssh`
* `tags`