Define the service creating a docker-compose yml fileversion: "1" services: web: image: USERNAME/REPO:TAG deploy: replicas: 5 resources: limits: cpus: "0.1" memory: 50M restart_policy: condition: on-failure ports: - "4000:80" networks: - webnet networks: webnet: Before deploying a service on a host it must be part of a swarmdocker swarm init Running the servicedocker stack deploy -c DOCKER-COMPOSE.yml SERVICE_NAME View the running servicedocker service ls docker service ps SERVICE_NAME_web Find the id of each containers running the servicedocker container ls -q To scale up or down the service change the number of replicas in the yml file and re deploy.docker stack deploy -c DOCKER-COMPOSE.yml SERVICE_NAME Adding does not kill and restart all, it adds the extra replicas Removing seem to remove from the bottom of docker service ps SERVICE_NAME_web. The last ones deployed. Take down the whole servicedocker stack rm SERVICE_NAME Leave the swarmdocker swarm leave docker swarm leave --force