network "xxx" is declared as external, but could not be found. .You need to create a swarm-scoped n

启动Docker compose报错:
network

报错内容:

network "school-service-net" is declared as external, but could not be found. 
You need to create a swarm-scoped network before the stack is deployed

解决办法:启动前手动创建overlay类型network

docker network create --driver overlay school-service-net

network 再次启动就好了:
network 通过potainer查看容器启动正常:
network

参考: https://stackoverflow.com/questions/58161371/network-hbase-is-declared-as-external-but-could-not-be-found-you-need-to-cre

你可能感兴趣的:(Docker)