Docker: Couldn't connect to docker daemon at http+docker://localunixsocket -is it running?

For me the following command worked,

sudo chown $USER:$USER -R .

Check this conversation I had on github, Issue


I ran into this issue after a fresh install of docker and docker-compose on Ubuntu, trying to run docker-compose up. I managed to solve it as described here by adding my user to the docker group:

sudo usermod -aG docker ${USER}

and logging out and back in.

You may be able to avoid having to log out and back in as described here by running

su - $USER

I just included sudo before docker-compose, and that did it.