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
What Is the Linux Equivalent to Dos Pause
Insert Multiple Lines into a File After Specified Pattern Using Shell Script
Self Modifying Code Always Segmentation Faults on Linux
Remove a Symlink to a Directory
Can't Clone a Github Repo on Linux via Https
Do I Need -D_Reentrant with -Pthreads
How to Make Bash Treat Undefined Variables as Errors
Best Practice to Run Linux Service as a Different User
How to Determine the Current CPU Utilization from the Shell
Install Mono and Monodevelop on Centos 5.X/6.X
Removing Part of a Filename for Multiple Files on Linux
A General Linux File Permissions Question: Apache and Wordpress
Will Read() Ever Block After Select()
Why Do Shells Ignore Sigint and Sigquit in Backgrounded Processes