How to create Docker Swarm Service.
Service is the definition of the tasks to execute on the worker nodes. It is the central structure of the swarm system and the primary root of the user interaction with the swarm. while creating service, you tell which container image to use and which commands to execute inside running containers.
We understand swarm cluster already has been configured as per below.Manager Node: docker-master 192.168.1.5Worker Node1: node1 192.168.1.3Worker Node2: node2 192.168.1.6
Step 1 : Running Service in the Docker Swarm
You will create service name "webserver" which will be using ngnix dokcer images beside you will map port 8080 on cluster so that you can access the default nginx page from anywhere.