Skip to content

Deploying a service

Course: Docker Swarm - chapter 5

  • Deploy the nginx service
docker service create --replicas 3 --name helloworld -p 3000:80 nginx
  • Check the status of the service
docker service ls
  • Go to the machine URL on port 3000 and ensure you see it running
your_machine_ip:3000
  • Try deleting a few pods and see if they come back up
  • Delete the service
docker service rm helloworld