Docker
Swarm Commands
Orchestrate containers across multiple hosts with Docker Swarm. Learn service deployment, scaling, rolling updates, and managing a cluster of Docker nodes.
16 commands
Pro Tips
Use 'docker service update --image app:v2 myservice' for zero-downtime rolling updates.
Deploy stacks with 'docker stack deploy -c docker-compose.yml stackname' for declarative management.
Use placement constraints to control which nodes run specific services based on labels.
Common Mistakes
Swarm manager nodes should be odd numbers (3 or 5) for proper Raft consensus and fault tolerance.
Losing quorum (majority of managers) makes the swarm read-only. Plan for manager availability.