Matched signals
- no active session for
- load build definition from Dockerfile
- load .dockerignore
- no active session
Docker BuildKit session lost
What this failure means
Docker BuildKit lost its session while loading the build definition or context, so the image build stopped before it could execute any build steps.
Symptoms
Faultline looks for one or more of these log fragments:
no active session for
load build definition from Dockerfile
load .dockerignore
no active session
Diagnosis
Docker BuildKit lost its session while loading the build definition or context, so the image build stopped before it could execute any build steps.
This usually means the build frontend could not keep its session open long enough to read the Dockerfile or context files.
Fix steps
-
Re-run the build with plain progress output so the failing phase is easier to see:
docker build --progress=plain . -
Confirm the Dockerfile path and build context are correct.
-
Check whether the CI runner is terminating idle sessions or losing its Docker connection mid-build.
-
If you are using BuildKit or
buildx, verify the builder instance is healthy:docker buildx ls docker buildx inspect
Validation
docker build --progress=plain .reaches the first build step without a session error.- Re-run the failing job and confirm the build definition and context load successfully.
Why it matters
When BuildKit loses its session, the image build fails before any real work starts, which wastes CI time and hides the actual build pipeline behind infrastructure noise.
Prevention
- Keep Docker build commands explicit and short-lived.
- Avoid fragile wrapper scripts that drop the BuildKit session before the build is complete.
- Add a small
docker build --progress=plainsmoke test to jobs that rely on BuildKit.
Try it locally
docker build --progress=plain .
docker build --progress=plain .
How Faultline detects it
Use faultline explain buildkit-session-lost to see the full playbook.
faultline analyze build.log
faultline explain buildkit-session-lost
Generated from playbooks/bundled/log/build/buildkit-session-lost.yaml. Do not edit directly.