Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 658 Bytes

swarm.md

File metadata and controls

35 lines (29 loc) · 658 Bytes

Docker swarm

Build images:

docker build -f front-end.dockerfile -t tsawler/front-end:tag1 .
docker push tsawler/front-end:tag1

Manage

docker swarm init
docker swarm join-token worker
docker swarm join-token manager
docker stack deploy -c <stack>.yml <name>
docker service ls
watch docker service ls
docker service scale <name>=<instances>

Updating (pull image and scale first)

docker service update --image tsawler/listener:1.0.1 myapp_listener-service

Bringing swarm down

Easy method:

docker stack rm myapp

To stop them, scale all services to 0, or just type

docker swarm leave