Docker Community Forums

Share and learn in the Docker community.

Swarm recreating containers on every boot


(Vittel) #1

I have an problem when using docker swarm.

I thought of the instances like services. you can start and stop em as you desire. but it seems like that on every reboot of my mashine (where 3 mongo single instance services are running) swarm will recreate 3 new containers for the service, instead of reusing the old ones. This results in a hell of containers after a while (i shut my system down at night). Is there a way to tell swarm to reuse the existing containers?