/output inside the Dockerfile. The generated Bake plan then uses a local output to copy that content to .buildcharts/output/<type> on the host during docker buildx bake.
Output behavior by stage type
| Stage type | Output behavior |
|---|---|
build | type=cacheonly |
docker | type=docker |
| Any other type | Export to .buildcharts/output/<type> |
test, nuget, and any custom non-docker type export local files under .buildcharts/output.
How local exports work
BuildCharts implements local outputs using Docker Buildx Bake build artifact exports. For any non-build and non-docker stage type, the generated docker-bake.hcl includes a local output like:
type=local exports the filesystem contents of the target stage to a local directory. That means everything that exists in the final stage is copied to .buildcharts/output/<type>.
This is why charts that export artifacts typically use a final FROM scratch stage and copy only the artifacts into it, for example:
Work with Docker outputs
docker stages use type=docker, so the image is loaded into your Docker environment instead of being exported to .buildcharts/output/docker.
Use tags in build.yml so the result is easy to reference: