Use docker swarm certificates to set DOCKER_HOST and run all the regular docker engine commands on a specific node

Like the title says, I was hoping to use existing swarm certificates (/var/lib/docker/swarm/certificates) on the swarm manager to connect to a swarm worker, similar to setting DOCKER_HOST environment variable to connect to a particular worker’s docker daemon to run regular docker engine commands. Is this possible? Or would I have to explicitly enable each worker’s daemon to run over TCP?


cd /var/lib/docker/swarm/certificates
docker --tlsverify --tlscacert swarm-root-ca.crt --tlscert=swarm-node.crt --tlskey=swarm-node.key -H=<workerhostip>:2377 ps

Never mind, I realized that the manager was the one that opened up the 2377 port, and not the workers. Looks like I have explicitly start the nodes to use tcp daemon if I want that.