Reputation: 723
I am facing an issue with Docker for Windows application. This is happening after updating to newer version of 4.3.2. Previous version was running without any issues. After downloading and updating to new version, whenever I launch Docker Desktop I get error message " Docker failed to initialize. Docker Desktop is shutting down. ".
I have tried many solutions like:
C:\Users\{...}\AppData\Local\Docker
C:\Users\{...}\AppData\Roaming\Docker
Can anyone please help me resolve this issue as I have already wasted few hours to resolve this.
I am not sure if I should completely uninstall docker and install freshly. If doing so, may remove all existing volumes and containers. I don't want to lose existing containers and data. BTW, I didn't sign-in while working with containers.
Your help will be much appreciated.
Thanks in advance
P.S: I am working with Docker for Windows on Windows 10 machine with WSL2 enabled. I have also enabled Containers and Virtual Machine Platform in Windows Features.
Upvotes: 20
Views: 18637
Reputation: 1603
I had to:
after logging in to Windows, I was presented with a new "Docker Subscription Service Agreement" which I had to accept, then:
This got it working for me.
Upvotes: 1
Reputation: 21
I just killed the already running docker-desktop from the task manager and started docker desktop again, and it worked.
Upvotes: 2
Reputation: 1
None of the "delete folder/file X" solutions worked for me. It ended up being much simpler than that: Open Task Manager and kill the running Docker Desktop process. After that, Docker Desktop started up with no problems.
Upvotes: 0
Reputation: 815
Managed to make it work agian by opening task admin and ending the docker task, apparently it was "running" but not really, maybe a bug but oh well just try that maybe you get it working without deleting or reinstalling anything.
Upvotes: 1
Reputation: 3895
Running C:\Program Files\Docker\Docker\resources\com.docker.backend.exe
command caused this error message for me:
creating rootNode subnodes: constructing 'BackendServices' in 'rootNode': doing migrations: migrating features.json: invalid character '\x00' looking for beginning of value
Therefore, I needed to delete the c:\Users\<username>\.docker\features.json
file, which indeed, contained only 0-bytes.
After this, I was able to start the binary.
Upvotes: 0
Reputation: 1
For MacOs users, I tried everything on this thread but nothing worked. The solution for me was to delete de hidden .docker folder located at the "Home" directory.
Upvotes: 0
Reputation: 153
I fixed this by removing following hidden folder
C:\Users\{...}\.docker
Upvotes: 0
Reputation: 5097
If you are experiencing this on v 4.13,
Then a simpler fix is described in the Docker for windows [issue: docker desktop failed to initialize](Per https://github.com/docker/for-win/issues/13025) from Oct 2022.
You don't have to delete %AppData%\Roaming\settings.json
,
just change a value in it.
Look for "vpnkitCIDR"
in that settings.json file. If its value is:
"vpnkitCIDR": "192.168.65.0/28",
... then the fix is:
%AppData%\Roaming\settings.json
, change the value to "vpnkitCIDR": "192.168.65.0/24",
Upvotes: 3
Reputation: 472
Fix: Manually remove this file \AppData\Roaming\Docker\locked-directories
I additionally run C:\Program Files\Docker\Docker\resources\com.docker.backend.exe and closed it gracefully.
After that it worked for me though i haven't tried a reboot.
Edit: Yes, works after a reboot as well
Upvotes: 8
Reputation: 586
It worked for me after removing the settings.json file as shown below
Upvotes: 36
Reputation: 51
Deleting docker folders in AppData\Roaming or AppData\Roaming did not work. Rolling back from v4.x to 3.6 worked.
Upvotes: 0
Reputation: 723
I re-installed Docker Desktop 4.3.2 for Windows. But before installing I took the backup of ext4.vhdx
file present in C:\Users\{...}\AppData\Local\Docker\wsl\data
. But fortunately any of the volumes and containers were removed and everything is restored and working fine.
To be on safer side, if anyone is facing similar situation please have the backup of ext4.vhdx
and you can restore your data from it.
Upvotes: 0