Navigate back to the homepage

learning docker - day 6

Christos Paschalidis
January 3rd, 2021 · 1 min read

swarm full app lifecycle



  1. create new service
1docker service create -p 8088:80 --name web nginx:1.13
  1. scale it up to 5
1docker service scale web=5
  1. update the service by changing the image to a newer version
1docker service update --image nginx:1.14 web
  1. change published port from 8088 to 9090

tip. you first add a new one and remove the old one at the same time. like so,

1docker service update --publish-rm published=8088,target=80 --publish-add published=9090,target=80 web
  1. tip update by force
1docker service update --force web
  1. always remove the services by
1docker service rm <serviceId>

docker healthchecks


More articles from blog for tech

learning docker - day 5


January 2nd, 2021 · 1 min read

learning docker - day 4

Docker commands I learned today

December 17th, 2020 · 1 min read
© 2020–2021 blog for tech
Link to $ to $