Docker Command Can't Connect to Docker Daemon

Can't connect to docker from docker-compose

The Docker machine is running. But you need to export some environment to connect to the Docker machine. By default, the docker CLI client is trying to communicate to the daemon using http+unix://var/run/docker.sock (as shown in the error message).

Export the correct environment variables using eval $(docker-machine env dev) and then try again. You can also just run docker-machine env dev to see the environment variables it will export. Notice that one of them is DOCKER_HOST, just as the error message suggests you may need to set.

How to check when docker daemon was restarted on widows?

You can find the docker daemon logs on windows in 2 locations:

C:\Users\%USER%\AppData\Local\Docker

and

C:\Users\%USER%\AppData\Romaing\Docker\log\vm

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running? Windows subsystem for Linux

It turns out the issue was to do with the groups. The solution that I found worked was to remove the user group "docker" using:

sudo groupadd docker
sudo usermod -aG docker $(whoami)

Then I ran the command for my make file and it worked!

I hope this benefits some of you!



Related Topics



Leave a reply



Submit