Skip to content
Latchkey

Docker "failed to solve: failed to load LLB" in CI

BuildKit compiles your Dockerfile into a low-level build (LLB) graph before it executes anything. "failed to load LLB" means the builder received a definition it could not decode - a corrupted or truncated LLB blob, a frontend that emitted a malformed graph, or a build context that did not transfer cleanly.

What this error means

A docker buildx build aborts immediately with failed to solve: failed to load LLB, before any RUN step prints output. The Dockerfile itself looks valid.

docker
ERROR: failed to solve: failed to load LLB: unexpected EOF

Common causes

A truncated or corrupt LLB definition

The frontend that compiles the Dockerfile emitted a graph the worker could not decode, often after a partial context transfer.

A mismatched or pinned Dockerfile frontend

A # syntax= line pinning a frontend image that is incompatible with the running BuildKit can produce LLB the worker rejects.

A stale or wedged builder instance

A buildx builder left in a bad state from a prior crashed build can fail to load fresh LLB until it is reset.

How to fix it

Recreate the buildx builder from scratch

  1. Remove the existing builder and create a clean one.
  2. A fresh builder loads the LLB graph without inherited corruption.
Terminal
docker buildx rm mybuilder || true
docker buildx create --name mybuilder --use
docker buildx build -t myorg/api:ci .

Pin a compatible Dockerfile frontend

  1. Set an explicit, current # syntax= line so the frontend matches your BuildKit.
  2. Avoid floating :latest frontend tags that can drift ahead of the worker.
Dockerfile
# syntax=docker/dockerfile:1.7
FROM alpine:3.20
RUN echo hello

How to prevent it

  • Pin a concrete Dockerfile frontend version with # syntax=.
  • Recreate ephemeral builders rather than reusing a wedged one across jobs.

Frequently asked questions

What causes ""failed to load LLB""?
The frontend that compiles the Dockerfile emitted a graph the worker could not decode, often after a partial context transfer.
How do I fix "failed to load LLB"?
Recreate the buildx builder from scratch

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card