Docker Community Forums

Share and learn in the Docker community.

Unable to promote node to docker manager in AWS

swarm
docker

(Travelinglex) #1

Hello,

I am new to Docker and have been attempting to build and manage a swarm in AWS. I created a single swarm manager and through docker-machine create --driver amazonec2 … I created two other instances. When I attempt to promote the node to swarm manager I get this error:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.37/swarm/init: dial unix /var/run/docker.sock: connect: permission denied

I’ve tried to use docker-machine --native-ssh ssh "docker swarm init --advertise-addr "

I’ve recreated the node, added myself through sudo usermod -aG ${USER} and restarted the docker service to no effect. I’m thinking it could be the ssh key mismatch? But I’m uncertain…

Any feedback would be great!

Thanks!