Changing node to manager in docker swarm – what command should I use

I want to add manager to my docker swarm environment.
I can run update:
docker node update --role manager my_node_name
or promote
docker node promote my_node_name

Is there any difference between those two command?

  • Unable to start jenkins auctomatically inside docker container
  • How to deploy an application using Docker
  • System.InvalidOperationException: Unable to resolve project 'HelloMvc6' from /ap p/src/HelloMvc6
  • Docker + PHP - ERROR: Couldn't connect to Docker daemon?
  • How to add jdbc driver to weblogic server running on docker container?
  • Closed Pipe error while doing sftp in vm using docker
  • Docker I’m on:

    docker -v
    Docker version 1.13.0, build 49bf474

  • How to run Spark on Docker?
  • How to deploy Rails application on Amazon Elastic Beanstalk on a single container Docker environment
  • Can't resolve docker related sbt tags
  • how to have gradle copy all the non-transitive dependencies, stripping the version number?
  • ship test assets with docker for continuous integration
  • is it possible to wrap an entire ubuntu 14 os in a docker image
  • One Solution collect form web for “Changing node to manager in docker swarm – what command should I use”

    If the node is a worker I think the result of the two commands are the same. The difference is IMO when you use this commands in scripts.

    root@docker-1:~# docker node promote docker-1
    Node 123123123123123 is already a manager.
    root@docker-1:~# echo $?
    root@docker-1:~# docker node update docker-1 --role manager

    which means the outputs (you can handle if you want) are different. Interesting that promote an already master is not an error.

    Your question’s title is not what you ask in the description by the way. Adding a manager node to the swarm is as simple as using

    docker swarm join --token ...

    With a manger token you can add a manager node to the swarm in one step, and you don’t need to promote it. (so this is a third way for creating a manager node)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.