Docker "error during connect ... docker_engine" (Windows Named Pipe) in CI
By Daniel Zoghalchali·Latchkey
On Windows, the Docker CLI talks to the engine over a named pipe (//./pipe/docker_engine). This error means the CLI could not open that pipe - the engine is not running, or the CLI is pointed at the wrong context.
What this error means
Any docker command on a Windows runner fails immediately with error during connect: ... open //./pipe/docker_engine: The system cannot find the file specified. No work happens because the CLI never reaches the daemon.
Terminal (Windows)
error during connect: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.45/version":
open //./pipe/docker_engine: The system cannot find the file specified.
Diagnose it: read the container, not the compose file
A container that exits immediately in CI has almost always logged the reason and then been cleaned up. Capture the logs and the exit code before changing configuration.
Terminal
# why did it stop?
docker ps -a --format '{{.Names}}\t{{.Status}}\t{{.Image}}'
docker logs <container> 2>&1 | tail -50
docker inspect <container> --format '{{.State.ExitCode}} {{.State.OOMKilled}} {{.State.Error}}'
Common causes
The Docker engine/Desktop is not running
On a Windows runner the engine may not be started, or Docker Desktop has not finished initializing, so the named pipe does not exist yet.
The CLI is set to the wrong context or engine mode
A context pointing at a non-existent engine, or Linux-vs-Windows container mode mismatch, leaves the pipe unreachable.
Using a Windows runner where a Linux daemon was assumed
A workflow written for Linux Docker fails on a windows-latest runner where the daemon (or container mode) differs.
How to fix it
Start the engine and confirm the pipe is up
Ensure the daemon is running before any docker command.
PowerShell
# PowerShell on a Windows runner
Start-Service docker
docker version # should now reach the engine
Point at the right context, or use a Linux runner
Run docker context ls and select the context for the running engine.
Switch container mode if the workflow targets Linux vs Windows containers.
If the job only needs Linux containers, run it on a Linux runner instead.
How to prevent it
Ensure the Docker engine/service is started as an early step on Windows runners.
Pin the correct docker context and container mode for the workflow.
Use Linux runners for Linux-container workloads unless Windows is required.
Frequently asked questions
What causes Docker "error during connect ... docker_engine" (Windows named Pipe) in CI?
There are 3 common causes: the docker engine/desktop is not running, the cli is set to the wrong context or engine mode, and using a windows runner where a linux daemon was assumed. On a Windows runner the engine may not be started, or Docker Desktop has not finished initializing, so the named pipe does not exist yet.
How do I fix Docker "error during connect ... docker_engine" (Windows named Pipe) in CI?
There are 2 fixes depending on which cause you have: start the engine and confirm the pipe is up and point at the right context, or use a linux runner. Work through them in order, since the first is the most common.
What does Docker "error during connect ... docker_engine" (Windows named Pipe) in CI actually mean?
Any docker command on a Windows runner fails immediately with error during connect: ...
How do I stop Docker "error during connect ... docker_engine" (Windows named Pipe) in CI happening again?
Ensure the Docker engine/service is started as an early step on Windows runners. The prevention section lists 3 changes that keep it from recurring.