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?

  • Grunt required github token during docker build
  • Localhost connect MySQL Docker confusion
  • Laradock (container) files on Windows
  • Where is the time spent starting a docker image?
  • Access docker containers from local network via dev suffix
  • Docker: reattach to `docker exec` process
  • Docker I’m on:

    docker -v
    Docker version 1.13.0, build 49bf474

  • How could I connect to nginx vhost in Docker container from linked php Docker container?
  • How packaging and deployment works in Azure ?
  • How to use docker to spin up postgres database
  • Is is possible to define memory and disk space for a Docker Container?
  • What is mean a valid name as a DNS name component?
  • Get a circleci environmental variable to show up in docker machine
  • 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.