If I run docker windows containers I can run docker commands ex:
docker ps I get this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESHowever if I switch to Linux containers (which is necessary for the image I need to build.) via docker desktop on Windows and try same command I get:
docker ps I get this:
error during connect: This error may indicate that the docker daemon is not running.: Get "": open //./pipe/docker_engine: The system cannot find the file specified.I have tried:
- switching the docker daemon to Windows (this fails to solve my problem given I need the linux daemon running as previously stated.)
- clicking the "Reset to factory defaults" button in docker desktop
- activating the "Expose daemon on tcp://localhost:2375 without TLS" option in docker desktop
- signing out and then back into my docker account
- quitting docker desktop via the system tray, shutting down wsl with 'wsl --shutdown' and then re-opening docker desktop (in that order).
- uninstalling/reinstalling docker desktop
- uninstalling/reinstalling the ubuntu 18.04 server on my PC.
Additional info: the message appearing on the main display when I open docker desktop reads: "Docker Desktop failed to stop..."
1 Answer
Solved the issue after unregistering the docker-desktop-data distro which is used by the docker-desktop distro as the backing store for container images etc. as well unregistering the docker-desktop distro.
running following commands in Powershell as admin fixed the issue:
wsl --unregister docker-desktopwsl --unregister docker-desktop-data