Docker Community Forums

Share and learn in the Docker community.

WSL and Docker for Windows: "Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?"

For those running Docker Toolbox, you don’t have the option to expose the daemon without TLS.

A solution that I found on Stack Overflow,

In your .bashrc or .zshrc add these lines.

export DOCKER_HOST=tcp:// // your Docker IP
export DOCKER_CERT_PATH=/mnt/c/Users/YOUR_USERNAME/.docker/machine/certs

You get your docker daemon ip by running, docker-machine ip in windows powershell.

Just source the updated profile config, and it works smoothly.
source .bashrc

Original Stack Overflow post: