Closed silgon closed 1 year ago
You also will have issues with iptables, swarm socket addresses... honestly you should not run two dockerd's in the same host unless they are isolated by containers.
The thing is in my case, I need one swarm configuration which is connected to another computer and another to be isolated in local for development. Another use-case is for people who want several isolated docker environments in a single computer, let's say one dockerd
for every user, thus they can have isolated configurations.
Looking a bit more in depth, I saw in the documentation the configuration that should be enable in order to use swarm mode:
I realized because I saw an error message given by dockerd
:
ERRO[2019-05-21T14:46:02.807800662+02:00] error in agentInit: failed to create memberlist: Could not set up network transport: failed to obtain an address: Failed to start TCP listener on "0.0.0.0" port 7946: listen tcp 0.0.0.0:7946: bind: address already in use
Is there a way to change these ports?
Let me close this ticket for now, as it looks like it went stale.
This is somehow a continuation of this answer about multiple docker deamons.
They use the following script to create the second docker deamon:
Now, I set my
DOCKER_HOST
to theunix
socket that was created. I initialize a docker swarm withdocker swarm init
with absolutely no problem. However, once I create a stack withdocker stack deploy -c myfile.yaml
I have to problems:Note: I created a stackoverflow question, however I realized that it might be better here. Anyway, here is the link to the question.