If you faced an issue like “Couldn’t connect to Docker daemon at http+docker://localunixsocket — is it running?”…
2 min readDec 21, 2017
If you faced an error like in the title when you run docker-compose build
, the solutions below may help you.
Is Docker engine running?
Check if Docker engine is running. Docker-compose might not have been able to access to Docker engine.
$ sudo service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2017-12-21 19:16:26 UTC; 1h 45min ago
Docs: https://docs.docker.com
Main PID: 20127 (dockerd)
Tasks: 23
Memory: 1.0G
CPU: 53.520s
Is the unix socket file of Docker has proper ownership?
Check if the docker Unix socket has correct file ownership. The Unix socket file should be like the following:
$ sudo ls -la /var/run/docker.sock
srw-rw---- 1 root docker 0 Dec 21 19:16 /var/run/docker.sock
Is your user in Docker user group ?
You should ensure that your user can access to Docker engine with the current privileges without sudo. It would be a good…