Cannot connect to the Docker daemon at unix var run docker sock Is the docker daemon running
I am trying to add one manager in Docker swarm. But it is showing me the below error.
$ docker swarm join --token xxxxxxxxxxxxxxxxxxxxx33m7g3xfg8o0gyl1rgkxkliq8kq2ov-bf2inz84bhwbdzp9ddvxrbfoi 172.31.11.98:2377
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
It seems the docker service is not running in your system. You need to start the docker service using the below command.
$ systemctl start docker
To Resolve the “cannot connect to the Docker daemon” Error, you can use:
- Method 1: Check the Docker Engine.
- Method 2: Assign Ownership to the Docker Unix Socket.
- Method 3: Check the Ownership of Used Files.
- Method 4: Add Your User to the Docker Group.
- Method 5: Add Environment Tables on OS X.