I'm trying bring down all services for an external network defined in my docker-compose file (using version 2).
When I try to do a docker-compose down
, I get a message stating,
Network 'your_network' is external, skipping
Is there a way, using docker-compose, to stop and remove all the containers for a user-defined or external network?
I've encountered the same error. docker-compose can only stop the containers started by docker-compose. In my case: the containers that I wanted to stop were started by docker run. So I stopped the containers one by one. then started them with the docker-compose.yml
Not sure if you are the same case.
This isn't an error. You have a network declared as "external", mostly meaning that it may be used by other services or other docker-compose files. So when you stop those services, the network gets "skipped", because the network is shared among all services that reference it, and it would create an error to try to delete the external network.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With