Skip to content

docker-container: wait for BuildKit before dialing - #4027

Open
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-docker-container-first-build-race
Open

docker-container: wait for BuildKit before dialing#4027
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-docker-container-first-build-race

Conversation

@crazy-max

Copy link
Copy Markdown
Member

fixes #4021
closes #4023

A freshly created docker-container builder can report as running before buildkitd is ready to serve its socket. This can make concurrent first builds fail with dial-stdio or server preface errors, and the cached driver client can make the first transient failure sticky. This change waits for BuildKit readiness before opening the docker-container dial path and only caches successfully created driver clients.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max force-pushed the fix-docker-container-first-build-race branch from 3f8e6c6 to 3c9abc6 Compare August 20, 2026 14:06
@crazy-max
crazy-max requested a review from tonistiigi August 20, 2026 14:06
@crazy-max crazy-max added this to the v0.37.0 milestone Aug 20, 2026
@crazy-max
crazy-max marked this pull request as ready for review August 20, 2026 14:06
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.

docker-container driver: builds connecting between container start and buildkitd readiness fail without retry (first-build bootstrap race)

1 participant