Create a replicated or global service in the swarm.
Section: Swarm Services
Create a service
bash
bash
docker service create --name web -p 8080:80 nginx:latestExplanation
This is the main swarm service deployment primitive.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Swarm Services