Command
docker service createExplanation
Creates a new service in the Swarm cluster that can be scaled across multiple nodes.
Examples
Create replicated nginx service
docker service create --name web --replicas 3 -p 80:80 nginxdocker service createCreates a new service in the Swarm cluster that can be scaled across multiple nodes.
Create replicated nginx service
docker service create --name web --replicas 3 -p 80:80 nginx