Docker Community Forums

Share and learn in the Docker community.

TLS issue when connecting to swarm 1.12.1 by docker client using docker -H

(Perigee17) #1

Dear all,

Try to connect to swarm 1.12.1 manager by a docker client

$ docker -H tcp://MY_MANAGER_1_IP:2377 info


Are you trying to connect to a TLS-enabled daemon without TLS?

Anyone has idea, thank you in advance.

(Jonshelley8) #2

I am encountering the same issue. Were you able to figure this out?

(Jonshelley8) #3

Just figured it out. You have to enable the tcp port when you start the docker daemon. I did this by adding the following

OPTIONS="-H tcp:// -H unix:///var/run/docker.sock"

to /etc/sysconfig/docker to my Centos 7.2 system. I then created a file which contained

ExecStart=/usr/bin/dockerd $OPTIONS

in the /etc/systemd/system/docker.service.d directory. I then needed to run

systemctl daemon-reload

Then I started docker again and was able to get the desired info using the docker -H :2375 info