Cannot create container for service xxx: invalid mode: /path/to/volume/

Problem

You are trying to use docker-compose to get some services up with docker but you see an error like the following:

Cannot create container for service xxx: invalid mode: /path/to/volume/

Solution

This is more than likely caused by a typo in your yml file, so go back and check carefully for any typos and correct them.

ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket – is it running?

Problem

Using docker-compose up (or build), displays the following error message (even though the same command used to work previously):

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

Solution

This is quite possible caused by permissions issue, as one of the folders files that docker is trying to use is owned by a different user/group from the one trying to use the docker-compose commands. Try to find the file/folder with the different permissions and change it to your user name and group, or use change the files by using something like:

chown -R me:me .