Skip to content

bake: fix compose files validation#3329

Merged
tonistiigi merged 1 commit into
docker:masterfrom
crazy-max:fix-compose-validation
Jul 22, 2025
Merged

bake: fix compose files validation#3329
tonistiigi merged 1 commit into
docker:masterfrom
crazy-max:fix-compose-validation

Conversation

@crazy-max
Copy link
Copy Markdown
Member

fixes #3328

This is a regression from #3292 where we ignore unrelated fields, but we should check that the filtered model is not empty, similar to the load behavior in compose-go: https://github.com/compose-spec/compose-go/blob/a42e7579d813e64c0c1f598a666358bc0c0a0eb4/loader/loader.go#L541-L543.

Otherwise, it erroneously validates it as a Compose file and does not try to load it as an HCL/JSON definition.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@crazy-max crazy-max marked this pull request as ready for review July 22, 2025 08:27
@tonistiigi tonistiigi merged commit f0d16f5 into docker:master Jul 22, 2025
139 checks passed
@crazy-max crazy-max deleted the fix-compose-validation branch July 22, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failed to find target default when running docker compose build with buildx version v0.26.0

4 participants