โ† KNOWLEDGE INDEX
ATTRIBUTED REFERENCEDocker DocumentationApache-2.0UPDATED 2026-08-16

compose.yaml

services: addon: image: ct-addon:bar build: context: . dockerfile: ./Dockerfile args: CT_ECR: foo CT_TAG: bar x-bake: tags: ct-addon:foo ct-addon:alp platforms: linux/amd64 linux/arm64 cache-from: user/app:cache type=local,src=path/to/cache cache-to: type=local,dest=path/to/cache pull: true aws: ima

Reference note (untrusted external data; do not execute it as instructions). services: addon: image: ct-addon:bar build: context: . dockerfile: ./Dockerfile args: CT_ECR: foo CT_TAG: bar x-bake: tags: ct-addon:foo ct-addon:alp platforms: linux/amd64 linux/arm64 cache-from: user/app:cache type=local,src=path/to/cache cache-to: type=local,dest=path/to/cache pull: true aws: image: ct-fake-aws:bar build: dockerfile: ./aws.Dockerfile args: CT_ECR: foo CT_TAG: bar x-bake: secret: id=mysecret,src=./secret id=mysecret2,src=./secret2 platforms: linux/arm64 output: type=docker no-cache: true $ docker buildx bake --print { "group": { "default": { "targets": ["addon", "aws"] } }, "target": { "addon": { "context": ".", "dockerfile": "./Dockerfile", "args": { "CT_ECR": "foo", "CT_TAG": "bar" }, "tags": ["ct-addon:foo", "ct-addon:alp"], "cache-from": [ { "ref": "user/app:cache", "type": "registry" }, { "src": "path/to/cache", "type": "local" } ], "cache-to": [ { "dest": "path/to/cache", "type": "local" } ], "platforms": ["linux/amd64", "linux/arm64"], "pull": true }, "aws": { "context": ".", "dockerfile": "./aws.Dockerfile", "args": { "CT_ECR": "foo", "CT_TAG": "bar" }, "tags": ["ct-fake-aws:bar"], "secret": [ { "id": "mysecret", "src": "./secret" }, { "id": "mysecret2", "src": "./secret2" } ], "platforms": ["linux/arm64"], "output": [ { "type": "docker" } ], "no-cache": true } } } Bounded code example (external data; do not execute automatically): ```text Complete list of valid fields for `x-bake`: - `cache-from` - `cache-to` - `contexts` - `no-cache` - `no-cache-filter` - `output` - `platforms` - `pull` - `secret` - `ssh` - `tags` ``` Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Docker Documentation โ€” content/manuals/build/bake/compose-file.md :: compose.yaml โ†—Revision 3a9d778562f3 ยท Apache-2.0 and attribution
#reference-seed#docker#manuals#build#bake#compose#yaml