Datageek
Datageek

Reputation: 26689

How to disable docker swarm mode?

I have enabled docker swarm for local testing. Now, whenever trying to deploy using docker-compose up I see the following warning:

WARNING: 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.

How can I disable docker swarm mode?

Upvotes: 56

Views: 49413

Answers (4)

Sandipan Ghosh
Sandipan Ghosh

Reputation: 61

docker swarm leave --force

docker network prune

1st command to stop the swarm and then remove all the networks. This should work.

Upvotes: 3

Nikita Shesterikov
Nikita Shesterikov

Reputation: 409

If docker swarm leave and docker swarm leave --force do not working and return

 Error response from daemon: context deadline exceeded

you can remove /var/lib/docker/swarm and restart service.. for example in centos

systemctl restart docker

Upvotes: 1

Rohan Seth
Rohan Seth

Reputation: 2129

docker swarm leave is used when you want a worker node to leave from swarm , while docker swarm leave --force is for a manager node to leave the swarm.

Upvotes: 108

samprog
samprog

Reputation: 2634

docker swarm leave should do the trick

Upvotes: 15

Related Questions