Fixing Docker and docker-compose named pipes error (code2)

Published on January 24, 2019

Docker on Windows 10 sometimes breaks after an upgrade. When you try to list containers or use docker-compose you’ll get an error on the command line. Here is an easy way to fix this issue.

The error looks like

> docker-compose up
Windows named pipe error: The system cannot find the file specified. (code: 2)

The first step is to right click on Docker for Windows in the status area

Docker settings
Docker settings

Click on “Settings”

Open the Reset Tab

Docker settings reset tab
Docker settings reset tab

Click “Reset to Factory Defaults…”

Docker will ask for your username and password and docker-compose up should work now!


Darragh ORiordan

Hi! I'm Darragh ORiordan.

I live and work in Sydney, Australia enjoying the mountains and the ocean.

I build and support happy teams that create high quality software for the web.

Contact me on Twitter!


Get new writings, curated tech articles and coding tips!