I have installed latest Docker Desktop. Currently unable to switch to Windows container. The option is blocked from task bar :
I am running Windows 10 Home 64-bit Build 19042.
You need windows 10 Pro or Enterprise to have access to Windows containers.
Source
The other answer will indeed switch your daemon mode to Windows, but you will not be able to pull any Windows container.
Update 2022:
The link above now mentions that it should work for
Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
I had spent hours debugging this issue and have to purchase win 10 pro license as well but still faced the same issue, by default it takes linux containers, switching to windows shows waiting forever, anyway here is how I fixed:
Windows Pro
Close/Shutt down the client by right clicking on the tiny icon on taskbar, and wait for a minute or two to have it close itself.
3.Open command prompt with Administrative rights
Type in this command:
c:\Program Files\Docker\Docker\resources>dockerd.exe
Open another command prompt with Administrative rights
C:\Program Files\Docker\Docker>DockerCli.exe -SwitchDaemon
Type "C:\Program Files\Docker\Docker>docker version" command to make sure it has switched to windows containers, it should look like attached screenshot
as per the latest Docker Desktop version, your settings should look like this
Quit Docker Desktop, and open again, Hope it helps some.
This command will change from windows to linux and vice versa.
I could not switch it easily, even using Altaf's approach. Eventually I went to Services (services.msc) and disabled Docker Desktop Service and updated docker service (Docker Engine) to make sure it can automatically start (for example, make sure the daemon.json config file exists in the location as the service command specified).
Then I can verify the result by typing docker version (in non-Administrative command prompt).
https://kontext.tech/article/1216/how-to-change-docker-data-root-path-on-windows-10#h-switch-to-windows-containers
When I am trying to built docker app, I am getting below error. Command I am running is docker build -t node_curd_exe .
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=h3q9gxeprezyco28agiqe9jp2&shmsize=0&t=node_curd_exe&target=&ulimits=null&version=1: 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.
Anything else I can do ?
I have encountered this problem myself. My problem was that I had configured Docker Desktop to not run at startup. As long as Docker Desktop is not running, you will not have the Docker daemon running, hence the error.
Quickly check whether you have a white whale in your taskbar before trying any more exotic solutions.
Try this:
"Hardware assisted virtualization and data execution protection must be enabled in the BIOS"
Typically, this problem is due to a disabled Hyper-V or because the hypervisor agent is not running.
Open a Windows shell as administrator and enable Hyper-V with:
dism /Online /Enable-Feature:Microsoft-Hyper-V /All
Reboot your machine and see if Docker for Windows starts.
If the above doesn't work, open a Windows shell as administrator and enable the hypervisor with:
bcdedit /set hypervisorlaunchtype auto
If Docker for Windows is still not working properly, try the following additional solutions, which are based on instructions extracted from this Docker for Windows issue thread.
Reboot your machine and see if Docker for Windows starts.
Copy this path: Control Panel\Programs\Programs and Features into a File Explorer address bar.
Click Turn Windows feature on or off on the left side of the Control Panel.
Clear the Hyper-V check box in the list of Windows features.
Reboot your machine and start Docker for Windows (or reinstall if necessary). If the above doesn't work, then Virtualization Based Security (VBS) might be interfering and needs to be disabled. Try the following to disable VBS:
Open the Local Group Policy Editor (gpedit.msc)
Go to Computer Configuration\Administrative Templates\System\Device Guard
Disable VBS.
I had a similar issue : Docker Desktop was configured to run Linux containers but my Visual Studio project targeted Windows containers.
So after launching Docker, I right-clicked the whale (was red) in the taskbar's tray and selected the 'Switch to Windows containers' menu item.
An error message showed up talking about 'Deny write access for fixed drives not protected by Bitlocker' which was fixed by launching a regedit and putting a 0 for the following key : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\Microsoft\FVE\FDVDenyWriteAccess
Then repeating the tray action finally worked and the whale turned to white.
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
try this on your CMD:
docker-machine create box
docker-machine env box
this issue still open
What solved in my case, on Windows 11, was to turn off Hypervisor and Windows Subsystem for Linux, reboot and turn on again.
I am getting below error When I try to install Docker on Windows 10 Home Edition.
[21:20:49.129] [InstallWorkflow] Pre-requisite failed: Docker for Windows requires Windows 10 Pro or Enterprise version 14393, or Windows server 2016 RTM to run
Can I Install Docker on Windows 10 Home Edition?
Edit Windows Version in Registry
Press Windows + R and write regedit
In the Registry Editor, go to \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
Right-click on EditionID and Click Modify
Change Value Data to "Professional"
Press OK.
Install Docker
After the installation, you can change the EditionID back to "Core"
As the error says, you cannot use Docker in the Home edition. You need "Windows 10 Pro or Enterprise version 14393, or Windows server 2016 RTM."
Check out their documentation here, which mentions, on 04/05/2018:
The current version of Docker for Windows runs on 64bit Windows 10
Pro, Enterprise and Education (1607 Anniversary Update, Build 14393 or
later).
As already mentioned in the comments, you might want to try the legacy Docker Toolbox:
Docker Toolbox is for older Mac and Windows systems that do not meet
the requirements of Docker for Mac and Docker for Windows.
Docker for Windows requires Hyper-V which is not included in Home edition.
You'll need to upgrade Windows to the Education or Pro edition.
https://docs.docker.com/docker-for-windows/install/#what-to-know-before-you-install
Also see this comment on GitHub.
You can already install Docker Desktop on Windows 10 Home.
This is how I did it:
You need to join Windows Insiders Program because you need WSL 2
You need to download the specific version of Docker Desktop: https://download-stage.docker.com/win/edge/41944/Docker%20Desktop%20Installer.exe which has a required change - allows install it on Windows 10 Home.
Those who have Windows Home Edition can now download and install Docker Desktop from below link.
https://docs.docker.com/docker-for-windows/install-windows-home/
Although not on Win10 Home per se, for evaluation purposes you can install Docker Desktop on a Win10 Pro virtual machine (VMWare player is my personal choice). You'll need to install VMWare Workstation Player which is free, and obtain a perfectly legal Win10 Pro image from microsoft directly here: https://www.microsoft.com/en-us/software-download/windows10
Be sure to activate the virtualization engine of the machine as Docker relies on Hyper-V:
This is how I resolved the problem. (OS- windows 10 home)
Join windows insider program. It enables you to update latest content of windows 10. You can find it in the start-> settings. Make sure to select Release Preview in the Insider program.(otherwise you will not get latest updates. After the installation you can pause frequent updates)
Check for windows update and update windows to latest version.(This will take awhile)
Install WSL 2 Linux kernel
https://learn.microsoft.com/en-us/windows/wsl/wsl2-kernel
I had below issue because I have tried to install this before updating windows. Please read the document carefully and follow steps.
If the installer cant find WSL 1 right click the Linux kernel update
installer, then press uninstall then rerun the installer
Now you are ready to update to WSL 2. Follow steps of this doc
https://learn.microsoft.com/en-us/windows/wsl/install-win10
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable the 'Virtual Machine Platform'
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your machine to complete the WSL install and update to WSL 2.
You can verify whether this by looking at task manager.
*Set WSL 2 as your default version
In PowerShell: wsl --set-default-version 2
Now you can install docker desktop version.
Finally https://docs.docker.com/docker-for-windows/
This might not work for some. If you find any issues please post. I'll try to help.
This might help someone who cannot upgrade their system to pro or professional. Consider installing Docker Toolbox on Windows. For mac users: Docker Toolbox on Mac
Legacy desktop solution. Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of 'Docker Desktop for Mac' and 'Docker Toolbox on Windows'. We recommend updating to the newer applications, if possible.
As per documentation, the toolbox includes these Docker tools:
Docker Machine for running docker-machine commands
Docker Engine for running the docker commands
Docker Compose for running the docker-compose commands
Kitematic, the Docker GUI
a shell preconfigured for a Docker command-line environment
Oracle VirtualBox
Get the latest update from https://www.microsoft.com/en-us/software-download/windows10 and it will work.
First of all I'd like to thank the previous respondents to this questions - saved me a lot of time and yes, they are both correct.
Secondly as a small completion to their answer, in case you are wondering where you can get a Pro version of Windows without breaking the bank, you can get a relatively cheap and legal Windows 10 pro cd-key from ebay and upgrade you version from Windows settings -> Activation.
https://www.ebay.com/sch/i.html?_from=R40&_nkw=windows+10+pro&_sacat=0&_sop=15
Just make sure you read the sold product description well and eventually the reviews if there are so that you know what to expect (if you encounter any issue, ebay will refund your purchase).
Best of luck to you all!
I have installed a Docker stable version, and it took forever to start.
Until now I have not seen the notification showing Docker is running.
I can only see the Docker icon at the taskbar, showing Docker is starting.
I am running on Windows 10 Pro, Intel Core 2 Duo E8500, supporting virtualization.
Important Note: As #Nachtalb said, "I think it should be noted that
this removes all docker containers and data. (WLS: Unregisters the
distribution and deletes the root filesystem)."
Thanks to https://github.com/docker/for-win/issues/7050, you should just run these two lines of commands inside PowerShell:
First, exit the docker hub desktop, then run these commands in PowerShell:
wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
How to Fix Docker for Windows "Docker Is Starting..." Error
I stumbled upon the solution which turned out to be super simple!
When Docker installs on a Windows device it doesn't bother to check if your Operating System is Windows, not Linux! So, it tries to start up looking for Linux containers that do not exist. Just set it to run under Windows containers!!
SOLUTION
In the lower right-hand corner of Windows, in your Notifications/System Tray section, right-click the docker "whale" icon.
In the context menu that pops up, choose "Switch to Windows containers..."
This should unfreeze "Dockers for Windows" instantly! If it does not, close "Dockers for Windows" and open it again.
:) peace
Personally, the most non-destructive method for myself has been to use:
wsl --terminate docker-desktop
wsl --terminate docker-desktop-data
Close Docker Desktop GUI (cancel/close any error messages)
Start Docker Desktop again.
Docker then indicates its starting the wsl services during its start process and my issues are resolved.
Other methods (like register/unregister) tend to be much more destructive and I lose configuration/data/volumes.
I guess you are using wsl2 features. In that case, open PowerShell or command prompt and type: optionalfeatures.exe
scroll down and uncheck
Windows Subsystem for Linux
apply the changes and restart your computer.
After restart follow the previous steps again and check
Windows Subsystem for Linux
and restart again. Hopefully now your docker will run
This is followed by docker/for-win issue 487 and mostly: issue 482.
The Diagnose and Feedback menu should allow you to access the logs which are in:
%LOCALAPPDATA%\Docker\log.txt
It will generate a zip file with said logs and other information.
The default recommendation is:
Reset to factory defaults (from the whale menu, Settings, reset)
If that doesn't work, manually uninstall docker and download the latest installer from https://docs.docker.com/docker-for-windows/
But sometimes, all the options in the "Reset" pane are grayed out.
For testing, desactivating the AV (AntiVirus) is an option (again, just to be tested).
Check also the state of your Network adapater in the device manager.
If you have a third-party network product like a VPN (for instance https://www.zerotier.com/), try and uninstall it before restarting docker.
Resetting Hyper-V could help:
Go to "Turn Windows features on or off", disable all Hyper-V related features, reboot, then Docker should ask if it can enable and reboot for you.
Let it do that and see if it's fixed. If not I'd probably try manually re-enabling Hyper-V.
Similarly:
I had a problem with most recent version. I uninstalled it, removed all docker folders and server and virtual switch from hyper-v and then reinstalled and it worked.
Check if you don't have some IP address already in use.
Finally, you can perform some Hyper-V tests.
This is what worked for me. In my case, docker uses WSL 2 instead of Hyper-V.
Type optionalfeatures in Windows search and hit Enter
Scroll down to Hyper-V. This checkbox was selected for me.
Deselect the checkbox and hit OK
Let Windows finish disabling the feature. When completed, hit Restart now
After restart, docker will start automatically very quickly
I also ran into this "Docker is starting..." problem on Win10 Enterprise version 22H2 with Docker Engine v20.10.22
I tried all of the top-rated comments, including uninstalling and reinstalling Docker, running wsl --unregister docker-desktop and wsl --unregister docker-desktop-data, deleting the Docker and Docker Desktop folders from AppData\Roaming\ etc. However, none of the solutions worked.
Instead, what eventually worked was running wsl --update in PowerShell. Note: Docker Desktop was not running when I tried this.
Work for me in powersheell in 17/10/2018
It looks like Hyper-V didn't get installed correctly either
Try to remove them, then install manually to see if that helps. Make sure you run powershell as an admin
Disable-WindowsOptionalFeature -FeatureName microsoft-hyper-v -online
(wait, sometimes until now you have decided, if not, continue)
restart-computer
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
restart-computer
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
or
run MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof in powershell
restarting the Hyper-V Management service
UPDATE
Looks like in Docker for Windows version: 17.09.0-ce-win33 (13620) they fixed the problem
This is an annoying problem that docker for Windows has. The latests versions have minimized it a lot but it still happens.
Check if docker for Windows will start when windows starts (this is the default behavior) if not check it.
Shutdown the machine. No restart. Shutdown.
Everytime you find this problem just shutdown the machine. The next time Windows boot docker will start very fast.
I know it looks esoteric but it works.
TLDR;
I have made a video that demonstrates fixing this: https://youtu.be/NHfqxx12kRs
TL;
I have the following Build Info:
Edition Windows 10 Pro
Version 22H2
Installed on 1/9/2021
OS build 19045.2075
Experience Windows Feature Experience Pack 120.2212.3920.0
These steps worked for me.
Step 1: Quit Docker Desktop
If your Docker desktop is open, then Quit and exit out of docker desktop
Step 2: Turn Windows Features on / Off
Ensure the following as shown below
Step 3: Install Ubuntu terminal environment with WSL
Launch Microsoft Store and search for wsl or Ubuntu. Install latest version of ubuntu as shown in screenshot.
Step 4: Enabling Docker support in WSL 2 distros
Now, Enabling Docker support in WSL 2 distros as mentioned here. Simply run the following commands in windows terminal:
wsl.exe -l -v
wsl.exe --set-default-version 2
wsl --set-default Ubuntu-22.04
For me the console looks like this.
C:\Users\tutlinks>wsl.exe -l -v
NAME STATE VERSION
* Ubuntu-22.04 Running 2
docker-desktop Stopped 2
docker-desktop-data Stopped 2
C:\Users\tutlinks>wsl.exe --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
C:\Users\tutlinks>wsl --set-default Ubuntu-22.04
C:\Users\tutlinks>wsl.exe -l -v
NAME STATE VERSION
* Ubuntu-22.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2
Step 5: Launch Docker desktop
Launch the Docker Desktop and wait for the engine to start.
Just solved this issue.
Not sure if it would help in your case but for me it was the PATH env variable that was not set up properly. Checking the diagnostics logs I was getting "powershell not found" and "docker not found" etc
The solution for me was to add everything to the PATH environment variable:
%SystemRoot%\system32; // Stuff like bash, wsl
C:\Windows\System32\WindowsPowerShell\v1.0; // powershell itself
C:\Program Files\Docker\Docker\resources\bin; // docker-compose etc
// edit
C:\Program Files\Docker\Docker\resources // docker itself
It might vary for your setup though
I had the same problem and nothing above helps.
I typed
bcdedit /set hypervisorlaunchtype auto
and after that I restart my PC. After that docker starts normally :) Finally.
Restarted Docker Desktop in Admin mode and it worked for me.
I solved the issue by installing linux-sub-system for win 11.
Open up PowerShell then run this command to see if you have installed already:
wsl -l -v
If you have this message:
Run this command:
wsl --install
then you will get list of valid distributions can be installed:
Choose your distro, in my case I used Ubuntu-20.04:
wsl --install -d Ubuntu-20.04
Also needed to switch to WSL 2
links that can help:
Windows Subsystem For Linux has no Installed Distributions Error Fix
Upgrade version from WSL 1 to WSL 2
For anyone on Windows 10 Home, what worked for me was running
wsl --update
Running wsl --status revealed the WSL 2 kernel file was missing from my machine and instructed me to enable the Receive updates for other Microsoft products when you update Windows option under
Settings > Update & Security > Advanced options
The same problem on Win 10 Pro 22H2 (Docker Desktop 4.16.1). For me the solution was to temporary switch to Windows container and then switch back to Linux containers.
Windows 11 Pro x64
I've tried it with Container and Hyper-V's not installed but it still didn't work.
I have Container and all the Hyper-Vs enabled then ran these 3 codes as Administrator in CMD in order one-by-one and it works:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
If your internet is running behind proxy - you should enter proxy settings in "Proxies" tab of docker's configuration window - that worked for me.
Go to Exploit Protection >Program Settings
Disable CFG of both
1.C:\Windows\System32\vmwp.exe
2.C:\Windows\System32\vmcompute.exe
For mine it works when I got Task Manager-> Startup->Disable Docker
Open Docker and it will run.
Case 1: If one was able to run docker successfully at the start and this "Docker Desktop Starting" is occurring suddenly after unexpected shutdowns or other interruptions, this could be fixed by switching between Linux and Windows containers.
'''
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine
or
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchWindowsEngine.
For the first case, you can also try to stop and restart docker services or uninstall and reinstall the docker application.
Case 2:
If Docker is not starting from the first time installation, this could be because you're system does not support or enabled hyper-v.
Understand one thing that is hard to discover, just enabling wsl 2 as backend for docker isn't enough as wsl itself relies on hyper-v for execution.
So check if you're system has hyper-v feature, if yes then enable it.
If not, follow these steps to install hyper-v manually:
Download the hyper-v.bat file for windows 10
Link: https://drive.google.com/file/d/1QT536aZMYSSj7rp766pv4YLpQaLcnB1F/view?usp=sharing
2: Open the hyper-v.bat file and the terminal screen will be displayed installing all hyper-v features.
3: Restart you're PC and go to Windows Features, Enable the hyper-v feature.
After this run the docker application making sure that wsl2 is already installed and updated.
you're docker will be in a running state if you don't have hyper-v but you've installed and enabled hyper-v through these steps.
As hyper-v features are pre-installed in windows enterprise and above version, finding out that the root cause of docker not starting was the absence of hyper-v, took me nearly two days to research.
I tried most of the top answers with no solution. Ended up with uninstalling and reinstalling docker and it worked.
Tried all solutions presented here with no success. This is the only solution that worked for me (from issue 1825).
In PowerShell, run:
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
I was struggling with this one and did all the steps mentioned above without success.
For me, it was that my BIOS required me to enable it through the motherboard's SVM option. Just make sure to restart your PC hit F2 or DEL and navigate and enable the SVM.
None of the existing answers work for me.
Go to Task Manager > Detail tab and kill every process that starts with wsl... (specially wslservice.exe)
I installed docker 4.16.2 and faced same issue. After following through many solutions, finally updating it to 4.16.3 works for me. Here's link to issue raised on official repo and solution suggested.
Comment providing 4.16.3 release candidate: https://github.com/docker/for-win/issues/13165#issuecomment-1405161605
Release Candidate (4.16.3 exe): https://desktop-stage.docker.com/win/main/amd64/96527/Docker%20Desktop%20Installer.exe
UPDATE
You can checkout official release here: https://docs.docker.com/desktop/release-notes/#4163
For me it was vmms service, that was disabled manually.
Check your ability to create virtual machines through powershell
Ctrl + Alt + Del => Task Manager => start up=> click on programs and click on disable => close task manager => Restart PC
If your docker takes forever to load the engine, just go to task manager and disable some running apps. It worked for me. Follow the steps
I got it working by:
stopping/killing everything in task manager that had the word "docker" in it.
unregistering all wsl2 distributions
install the WSL2 distribution I needed.
start docker desktop and wait about 5 minutes - success!
Powershell as admin:
wsl -l
Repeat for each distribution
wsl --unregister <name of distribution>
Install the one you require
wsl --install -d <name of distribution>
Enable VM platform and update wsl solve my issue:
Search turn Windows features on or off > tick Virtual Machine Platform checkbox
Run command prompt with adminstrator mode, and execute wsl --update
After restarting system, I am able to run docker.