Skip to content

dockerfile: ignore empty BUILDKIT_SYNTAX overrides#6594

Open
crazy-max wants to merge 1 commit intomoby:masterfrom
crazy-max:empty-buildkit-syntax
Open

dockerfile: ignore empty BUILDKIT_SYNTAX overrides#6594
crazy-max wants to merge 1 commit intomoby:masterfrom
crazy-max:empty-buildkit-syntax

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Mar 19, 2026

follow-up docker/buildx#3734

Treat an empty BUILDKIT_SYNTAX build argument as an explicit request to skip frontend forwarding. This lets builds fall back to the built-in Dockerfile frontend instead of trying to resolve an empty external frontend reference.

Before with docker/buildx#3734:

$ docker buildx build --build-arg BUILDKIT_SYNTAX="" https://github.com/docker/compose.git
#0 building with "default" instance using docker driver

#1 [internal] load git source https://github.com/docker/compose.git
#1 0.597 ref: refs/heads/main   HEAD
#1 0.597 b043368028e9fcb4545fa340c8ad635c370825da       HEAD
#1 1.046 b043368028e9fcb4545fa340c8ad635c370825da       refs/heads/main
#1 CACHED
ERROR: failed to build: failed to solve: failed with build-arg:BUILDKIT_SYNTAX = : invalid context name : invalid reference format

After with docker/buildx#3734:

$ docker buildx --builder builder build --build-arg BUILDKIT_SYNTAX="" https://github.com/docker/compose.git
#0 building with "builder" instance using docker-container driver

#1 [internal] load git source https://github.com/docker/compose.git
#1 0.598 ref: refs/heads/main   HEAD
#1 0.605 b043368028e9fcb4545fa340c8ad635c370825da       HEAD
#1 0.993 b043368028e9fcb4545fa340c8ad635c370825da       refs/heads/main
#1 0.059 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 0.644 ref: refs/heads/main   HEAD
#1 0.649 b043368028e9fcb4545fa340c8ad635c370825da       HEAD
#1 1.325 From https://github.com/docker/compose
#1 1.325  * [new branch]      main       -> main
#1 1.325  * [new branch]      main       -> origin/main
#1 1.329 b043368028e9fcb4545fa340c8ad635c370825da
#1 DONE 2.5s

#1 [internal] load git source https://github.com/docker/compose.git
#1 DONE 4.0s

#2 [internal] load metadata for docker.io/tonistiigi/xx:1.9.0
#2 ...

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
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.

1 participant