Contributing guidelines
I've found a bug and checked that ...
Description
When using docker buildx bake with a Compose file where cache_to is explicitly defined as an empty array ([]), the build fails with a schema validation error.
Buildx version: 0.34.0
Expected behaviour
The bake process should treat cache_to: [] as a valid instruction to not export any cache, or ignore the empty list, and proceed with the build.
Actual behaviour
ERROR: services.test-buildx.build.cache_to must be a array
Buildx version
github.com/docker/buildx v0.34.0 3e73561
Docker info
Client: Docker Engine - Community
Version: 29.4.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.34.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.1.3
Path: /usr/libexec/docker/cli-plugins/docker-compose
Builders list
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
default* docker
\_ default \_ default running v0.29.0 linux/amd64 (+3)
Configuration
Steps to Reproduce
-
Install buildx version 0.34.0
-
Create a docker-compose.yml with cache_to []:
e.g.
services:
test-buildx:
build:
context: .
cache_from:
- type=registry,ref=.dkr.ecr.us-east-1.amazonaws.com/app-cache:arm64
cache_to: []
-
Run the bake command:
docker buildx bake --load test-buildx
ERROR: services.test-buildx.build.cache_to must be a array
Build logs
Additional info
No response
Contributing guidelines
I've found a bug and checked that ...
Description
When using docker buildx bake with a Compose file where cache_to is explicitly defined as an empty array ([]), the build fails with a schema validation error.
Buildx version: 0.34.0
Expected behaviour
The bake process should treat cache_to: [] as a valid instruction to not export any cache, or ignore the empty list, and proceed with the build.
Actual behaviour
ERROR: services.test-buildx.build.cache_to must be a array
Buildx version
github.com/docker/buildx v0.34.0 3e73561
Docker info
Builders list
Configuration
Steps to Reproduce
Install buildx version 0.34.0
Create a docker-compose.yml with cache_to []:
e.g.
services:
test-buildx:
build:
context: .
cache_from:
- type=registry,ref=.dkr.ecr.us-east-1.amazonaws.com/app-cache:arm64
cache_to: []
Run the bake command:
docker buildx bake --load test-buildx
ERROR: services.test-buildx.build.cache_to must be a array
Build logs
Additional info
No response