I am trying to create a container in a multihost network but while creating I am getting this error:
Error response from daemon: network myapp not found
Here myapp
is the name of overlay network which i have created. The command I am using is:
sudo docker run --rm -it --name=test_cont --net=myapp ubuntu bash
I started getting this error after doing a docker system prune
.
docker network ls
showed my network:
NETWORK ID NAME DRIVER SCOPE
pgl0gb0mbwql myapp overlay swarm
But deploying the stack would give error like:
failed to create service myapp_database: Error response from daemon: network myapp not found
Then I asked myself the most important debugging question there is: Have you tried turning it off and on again?
I restarted my docker daemon and the network was deleted for real. I was then able to re-create it and everything started working again.
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