Open
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
I can't find what I'm looking for
Description
This is a cruel joke:
"or YAML formats, where the YAML format is an extension of a Docker Compose file."
I spent a few hours trying to get YAML to work with no success. It would be nice to give some YAML examples... or just remove that text all together :-)
It's not at all clear what the syntax of an analogous yaml bake file should be.
Location
https://docs.docker.com/build/bake/
Suggestion
Give corresponding YAML examples... or just don't mention that YAML is an option. Thank you for making docker!
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
thaJeztah commentedon Jun 6, 2025
I suspect the intent here was to describe that
docker bake
/docker buildx bake
can build from a compose file, in addition to a bake-file, but it's indeed confusing because the page doesn't explain that, doesn't show an example, and doesn't link to the compose-file reference ("build") section;thaJeztah commentedon Jun 6, 2025
@glours @ArthurFlag @crazy-max PTAL
crazy-max commentedon Jun 6, 2025
I think we could link to https://docs.docker.com/build/bake/compose-file/
glours commentedon Jun 6, 2025
IIUC there is an ambiguity with the following sentence which doesn't clearly explain that the YAML file expected is in fact a Compose file
What is "an extension of a Docker Compose file" here?
thaJeztah commentedon Jun 6, 2025
I wasn't sure if JSON was still supported, but https://docs.docker.com/build/bake/reference/ shows it does, so I think it's trying to outline that a bake-file could be either;
(possibly a link to "file formats"; https://docs.docker.com/build/bake/reference/#file-format)
I think it would be a nice addition to show the "basic" example on that page in both HCL and JSON ("example Bake file"), and (perhaps as separate tabs) show the same file in HCL and JSON format, or if we can't use tabs, something like "Here's the same example in JSON format).
We should include a link to "refer to the bakefile reference for detailed information on the bake-file format" (https://docs.docker.com/build/bake/reference/)
And then a link and/or short section to describe that bake can also use a docker-compose file that has "build" sections, and for that we can link to https://docs.docker.com/build/bake/compose-file/