I have Windows 10 home so I am not able to install docker for windows version. Upon downloading and installing docker toolbox on windows and installing docker on wls bash by running the following
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ceI get this error on running docker images: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
on checking service docker status - it says it is not running
I know that we need to check the enable expose daemon on tcp://localhost:2375 without tls but we can't access the settings GUI on docker toolbox.
Is there any other way to enable this option?
2 Answers
I couldn't find a way to expose the Docker Toolbox Daemon without TLS, but running this in WSL worked for me
DOCKER_CERT_PATH='/mnt/c/Users/<user>/.docker/machine/certs'
DOCKER_HOST='tcp://<ip-address>:2376'
docker infowhere <ip-address> is where the Docker daemon is running.
An older question which got bumped today via an edit, so I'll go ahead and add another answer with the explanation for the problem that the OP originally experienced.
At the time the question was asked, only the first version of WSL (now referred to as WSL1) existed. WSL2 would not come out for another year.
WSL1 does not support Docker CE. It is a "translation layer", rather than a virtualized environment. That translation layer attempts to map Linux API calls to Windows API calls. It does a great job of this, but it does have limitations. A lot of the Linux kernel features needed for Docker (CNAMES, namespaces) are included in that.
When WSL2 came out in 2020, it did support these features through virtualization, and that allows Docker to run natively in WSL2.
However, the OP also mentioned a separate problem, that they were trying to do this because Docker Desktop wouldn't run on Windows Home. That also was true in 2018 when the question was asked. Docker Desktop required Windows Hyper-V to create the VM needed for Docker.
But that's no longer the case. The release of WSL2 (which can run on Windows Home) allowed the Docker team to rearchitect Docker Desktop run on Windows Home using WSL2.