Error response from daemon: network myapp not foun

2019-05-23 11:14发布

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

标签: docker
1条回答
我只想做你的唯一
2楼-- · 2019-05-23 11:27

Docker networks are scoped for different access. Your myapp network is an overlay network scoped to the swarm.

That means you can only use it at swarm level - docker service create --network myapp will work fine, because services are at swarm level too.

You can start a container with docker run on a swarm, but it will only run locally on the node where you run the command on, so it can't see swarm networks.

查看更多
登录 后发表回答