简体   繁体   中英

I am trying to create containers on docker host without swarm mode.I am getting error " Error response from daemon: network myapp not found"

Command I am using sudo docker run -itd --name=web --network=myapp nginx . I am on ubuntu server OS.

码头工人网络检查

码头工人信息

You were created an overlay network with Docker Engine swarm mode, which name is "myapp". However, overlay networks for a swarm are not available to containers started with docker run that don't run as part of a swarm mode service.

If you want create a network for your local containers, you should consider to create a local bridge network with the following command:

$ docker network create --driver bridge myapp

You may need to read that Understand Docker container networks document carefully, which explained the difference between bridge network and overlay network very well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM