Docker Swarm Config objects

# Create config object
docker config create nginx-conf /tmp/nginx.conf

# create service bind config object
docker service create --replicas=3 --config src=nginx-conf,target="/etc/nginx/nginx.conf" nginx

# remove config object
docker service update --config-rm nginx-conf nginx
docker config rm nginx-conf

# rotate new config
docker config create new-nginx-conf /tmp/nginx-new.conf
docker service update --config-rm nginx-conf --config-add new-nginx-conf nginx

  •  
  •  
  •  
  •  

Viet Luu has written 276 articles

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

We are thankful for your never ending support.