Skip to content

Instantly share code, notes, and snippets.

@seafooler
Created December 20, 2017 05:22
Show Gist options
  • Save seafooler/772b83007e2f423d6903a1aa53db1423 to your computer and use it in GitHub Desktop.
Save seafooler/772b83007e2f423d6903a1aa53db1423 to your computer and use it in GitHub Desktop.
Fix: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
## Problem
```
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```
## Reasons
There are several graphdrivers available and Docker daemon cannot decide which one to choose.
You can find the reported problems in `/var/log/upstart/docker.log`
## Solution
Specify the graphdriver in the Docker daemon configuration and the commands are shown as follows:
```
#Specify the storagedriver as overlay2
sudo bash -c 'echo -e "{\n \"storage-driver\": \"overlay2\"\n}" >> /etc/docker/daemon.json'
#Restart Docker
sudo service docker restart
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment