# Docker "error during connect ... docker_engine" (Windows Named Pipe) in CI

> Fix Docker "error during connect ... open //./pipe/docker_engine: The system cannot find the file specified" on Windows CI - Docker Desktop/engine not running or wrong context.

Source: https://latchkey.dev/learn/docker/docker-error-during-connect-named-pipe  
Updated: 2026-06-25

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.

## 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}}'
```

> `OOMKilled: true` means the kernel killed it for memory, and no amount of application debugging will explain the log. Exit code 137 is the same event seen from outside.

## FAQ

### 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.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
