Docker Swarm is Docker's built-in container orchestration tool — turning a group of Docker hosts into a cluster managed with familiar Docker commands. It's simpler than Kubernetes but less powerful; understanding both helps choose the right orchestration for the situation.
What Docker Swarm provides
Swarm clusters multiple Docker hosts and orchestrates containers ("services"):
✓ Built into Docker — uses familiar Docker CLI/Compose-like syntax (low learning curve)
✓ SERVICES with replicas; scheduling across nodes; SELF-HEALING (restart failed tasks)
✓ Scaling, ROLLING UPDATES/rollbacks, overlay networking, service discovery, secrets
✓ Load balancing (built-in routing mesh)
docker swarm init
docker service create --replicas 3 --name web -p 80:80 nginx
docker service scale web=5
docker service update --image nginx:1.25 web
