0

I have set up an instance with Ubuntu 16.04, and followed the instructions to install Docker CE.

dockerd is running, as is docker-containe

When I try to run:

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

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

I believe this error is specific to Google Compute Engine. Can anyone give me an insight on where to look to fix it?

  • Does the same docker-compose up command run with sudo trigger the same error message? Also, what is the output of echo $DOCKER_HOST? – David B. May 26 '17 at 14:13
  • $DOCKER_HOST isn't set – chrism2671 May 31 '17 at 13:49
1

In several cases this is due to the current user not being in the docker group.

sudo usermod -aG docker current_user could then solve this issue.

  • That didn't seem to fix it unfortunately, but it did give me the idea to try sudo, which did work. What's the right way of doing this? – chrism2671 May 31 '17 at 13:53
  • You might need to relogin for the sudo usermod... command to be applied to your user. I'd aslo try running eval $(docker-machine env default) to set the DOCKER_HOST variable. – David B. May 31 '17 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.