You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the default user shell is set to a non-Bourne shell, the /var/run/docker.sock socket is not created. Attempting to run docker ps results in the error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. In my case, I had the fish shell installed. This has not previously been an issue, I believe the issue was introduced in Docker Desktop 4.25.0, as it has only started occurring recently on my machine.
This does not appear to affect the Docker binaries, which are correctly linked from /usr/bin (docker, docker-compose etc) to /mnt/wsl/docker-desktop/cli-tools/usr/bin/ as you'd expect.
Tested against WSL2 versions of Ubuntu and Rocky Linux 8, to eliminate distribution dependent issues.
Reproduce
Install WSL2 and add a distribution
Install the fish, csh or tcsh shells in the distribution
Change the user shell to the new shell (e.g. chsh -s /usr/bin/fish)
Log out of WSL2
Shut down WSL with wsl --shutdown in a powershell/command window
Install Docker Desktop 4.25.0
Ensure it is set with the WSL2 engine and with the WSL2 integration for the chosen integration (or default if applicable)
Load a new WSL2 terminal window
run docker ps
Observe error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Observe missing /var/run/docker.sock and /var/run/docker-cli.sock files
If the shell is then changed back to /usr/bin/bash, then the instance is terminated using wsl --terminate [distribution name] at a Windows command prompt, then the instance reloaded, the expected behaviour returns. Sometimes also required a restart of the Docker Desktop software.
Confirmed behaviour does not occur with bash, sh, dash and zsh as the user shell.
Expected behavior
Standard empty image list $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Description
If the default user shell is set to a non-Bourne shell, the /var/run/docker.sock socket is not created. Attempting to run
docker ps
results in the errorCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
. In my case, I had the fish shell installed. This has not previously been an issue, I believe the issue was introduced in Docker Desktop 4.25.0, as it has only started occurring recently on my machine.This does not appear to affect the Docker binaries, which are correctly linked from /usr/bin (docker, docker-compose etc) to /mnt/wsl/docker-desktop/cli-tools/usr/bin/ as you'd expect.
Tested against WSL2 versions of Ubuntu and Rocky Linux 8, to eliminate distribution dependent issues.
Reproduce
chsh -s /usr/bin/fish
)wsl --shutdown
in a powershell/command windowdocker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
/var/run/docker.sock
and/var/run/docker-cli.sock
filesIf the shell is then changed back to /usr/bin/bash, then the instance is terminated using
wsl --terminate [distribution name]
at a Windows command prompt, then the instance reloaded, the expected behaviour returns. Sometimes also required a restart of the Docker Desktop software.Confirmed behaviour does not occur with bash, sh, dash and zsh as the user shell.
Expected behavior
Standard empty image list
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker version
Client: Docker Engine - Community Cloud integration: v1.0.35+desktop.5 Version: 24.0.6 API version: 1.43 Go version: go1.20.7 Git commit: ed223bc Built: Mon Sep 4 12:32:16 2023 OS/Arch: linux/amd64 Context: default Server: Docker Desktop Engine: Version: 24.0.6 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: 1a79695 Built: Mon Sep 4 12:32:16 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.22 GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca runc: Version: 1.1.8 GitCommit: v1.1.8-0-g82f18fe docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
8FED7B34-8F81-4B7E-B47F-4E7D6C869FC9/20231107115031
Additional Info
No response
The text was updated successfully, but these errors were encountered: