Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker not switching to Linux containers on Windows 10

I am running docker for windows on Windows 10 Enterprise edition. It runs successfully in windows container mode. When I do right-click on docker icon and "Switch to Linux Container", it keeps on switching and after some time, it throws the below error:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.38/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.<>c__DisplayClass25_0.b__0() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 275
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

I am using hyper-v and it is enabled. This issue is always reproducible. I have tried "restoring to factory default" and restart both but it does not solve my issue. Please let me know if I am doing anything wrong here.

like image 478
NumeroUno Avatar asked Nov 07 '22 04:11

NumeroUno


People also ask

How do I switch from Docker to Linux on Windows?

You can toggle this by selecting Switch to Linux Containers from the action menu when clicking on the Docker whale icon in the system tray. If you see Switch to Windows Containers , then you are already targeting the Linux daemon.

Can Docker run Linux containers on Windows?

Docker has been able to run Linux containers on Windows desktop since it was first released in 2016 (before Hyper-V isolation or Linux containers on Windows were available) using a LinuxKit based virtual machine running on Hyper-V.

Why is Docker not working Windows 10?

Operating System. If you do not run a 64-bit version of Windows Windows 10 Pro, Enterprise, or Education; 1511 November update, Build 10586 or later, you cannot run Docker for Windows. You can install Docker Toolbox if you have a 64-bit version of Windows 7 or later. Alternately, you do have the option to upgrade.

Can Docker Desktop run Windows and Linux containers side by side?

Docker Desktop for Linux and Docker Engine can be installed side-by-side on the same machine. Docker Desktop for Linux stores containers and images in an isolated storage location within a VM and offers controls to restrict its resources.


1 Answers

After updating to latest docker, my issue was also resolved.

like image 160
NumeroUno Avatar answered Nov 14 '22 21:11

NumeroUno