退出Docker Swarm集群模式
本地初始化了docker swarm,然后使用docker-compose up
都会提示让使用docker stack deploy
进行部署:
The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.
To deploy your application across the swarm, use `docker stack deploy`.
这个时候需要退出Docker Swarm模式:
1.管理器节点离开Docker Swarm模式
docker swarm leave --force
2.普通节点离开Docker