2 matches found based on name: network container-name_default is ambiguous

$ docker-compose up
ERROR: 2 matches found based on name: network container-name_default is ambiguous

I ran into this the other day after I upgraded my docker instance and clearing out several containers. A quick google search lead me to this github issue, and I learned about the docker network command

$ docker network ls
NETWORK ID          NAME                     DRIVER              SCOPE
9839ffe1fd79        bridge                   bridge              local
d9c90e49aa35        container-name_default   bridge              local
a39b5440fb66        container-name_default   bridge              local
99fb77547915        host                     host                local
43e2df6e4d14        none                     null                local

You can see that I have two network bridges but no container running. Time to kill those. Take note of how I use the NETWORK ID and remove them.

Bash
docker network rm d9c90e49aa35 a39b5440fb66

and now my command works! YAY.

Leave a Reply

I’m David

Welcome to my little corner of the internet that I dedicate to programming. I’m a principal software engineer at Fynix Consulting and strive to always be learning new things. I love to code and I love to write about coding!

Let’s connect

Discover more from David Boothe's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading