Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active August 25, 2025 20:40
Show Gist options
  • Select an option

  • Save peteristhegreat/919210d5e14ffb6ee76a07c89cb08f26 to your computer and use it in GitHub Desktop.

Select an option

Save peteristhegreat/919210d5e14ffb6ee76a07c89cb08f26 to your computer and use it in GitHub Desktop.
Is the docker daemon running? WSL, Rancher Desktop

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

Happiness!

$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Saddness!

Symptom

You installed Rancher Desktop, and you have setup Ubuntu on your WSL2 environment and then you go to try some docker things and it is not working.

$ type docker
docker is hashed (/mnt/c/Program Files/Rancher Desktop/resources/resources/linux/bin/docker)

But you see sadness.

$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

The Fix

Rancher Desktop > Main Window > Preferences > WSL > Integrations (Tab)

  • Expose Rancher Desktop's Kubernetes configuration and Docker socket to Windows Subsystem for LInux (WSL) distros

  • Ubuntu

Hit that check box as fast as you can, and you are off to the races! Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment