whyWhy do you want to create a new managerManager node, risking damaging your raft consensus and cie...?
I find it way more easier to simply expose the docker socket locally like, as if you wherewere working inside the node, but with you windowsyour Windows environment.
To do so, simply open ana ssh tunnel that expose theexposes /var/run/docker.sock
:
ssh -M -S ~/.docker.sock \
-fnNT -4 -L localhost:1337:/var/run/docker.sock \
USER@MANAGER_IP
I let you referRefer to man ssh
to see what all thisthese options meansmean.
It
It will open an ssh tunneltunnel; you will still be onin your local environment shell, only thingsthing left to do is set the proper DOCKER_HOST
environment var, so your docker cli is bindbound to your swarm manager.
export DOCKER_HOST=localhost:1337
export DOCKER_HOST=localhost:1337
And that's it.
Note: Docker include also includes an option to do thisthis; I've quickly searchsearched for it but can't managermanage to find it. It's in the most recent version of docker.