Docker stack simplifies the application management by providing: desired state, rolling updates, simple, scaling operation, health checks.

Simple Process

Define app in Compose file and deploy and manage it with

  docker stack deploy
  cat docker-compose.yml | docker stack deploy --compose-file -


  • id/ID (--filter id=7be5ei6sqeye, or --filter ID=7be5ei6sqeye)
  • label (--filter label=key=value)
  • model (--filter mode=replicated, or --filter mode=global)
  • name (--filter name=myapp_web)
  • node (--filter node=mynode)
  • service (--filter service=web)


.IDService ID
.NameService name
.ModeService mode (replicated, global)
.ReplicasService replicas
.ImageService image
docker stack services --format "{{.ID}}: {{.Mode}} {{.Replicas}}"