Docker Failed to Initialize on Windows

19,090

Solution 1

Got the same issue and fixed it by deleting %appdata%\Docker as mentioned by Github User "tocklime"

(Original Source : https://github.com/docker/for-win/issues/3088) enter image description here

Solution 2

My solution: delete %appdata%\Docker\settings.json and let Docker to create a new one.

Take a backup of the file for the next time it gets broken.

<tl;dr>

I face this issue almost every month and I hope this will get fixed definitely.

Following tmBlackCape answer, I checked the %appdata%\Docker directory and found settings.json damaged (editor tells it's a binary file and of course it shouldn't).

I deleted the file and Docker Service (still running) created a new one with default values. If the service isn't running, just launch it again.

You could need to change settings (via GUI, as recommended) to catch your needs.

I made a backup copy of my custom settings.json so next time I can replace the broken one without losing custom configuration.

Solution 3

Go to the directory C:\Users-------\AppData\Roaming\Docker and delete the file settings.json . Docker takes care of rewriting it at startup.

This manipulation solved the problem for me !

Solution 4

Docker failed to initialize

C:\Users[USER]\AppData\Local\Docker

C:\Users[USER]\AppData\Roaming\Docker

C:\Users[USER]\AppData\Roaming\Docker Desktop

Once deleted above directory, I didn’t have to do anything else, Docker Desktop started booting up as normal.

Solution 5

This happened to me after Docker Desktop upgrade to version 3.6.0 (67351), too. (Which was surprising, because it worked before the upgrade.)

Due to the help in the top answer right now, I went to the above settings directory: %appdata%\Docker, looked at the logs and deleted/renamed the file settings.json -> Docker Desktop started immediatelly ; there had been a process retrying in the background.

In the time before that, the backend.exe.log had been all "unmarshal" something something:

    settings.json: json: cannot unmarshal bool into Go struct field Content.proxyHttpMode of type string"
common/cmd/com.docker.backend/internal/settingsloader.GetSettings(0x0, 0x0, 0x0)

So, the above message 'tipped me off' as to where the actual error on start may be. Hmm...

Share:
19,090
Ayush
Author by

Ayush

Updated on June 03, 2022

Comments

  • Ayush
    Ayush almost 2 years

    Here, I have problem regarding pulling docker-dev in docker image for making my development environment but when I tried to pull docker-dev. I got the error like docker manifest not found. Can anyone help me out with this error...plz

    before this I want to know about the docker failed to initialize error which i'm having right now...

    the error is like, enter image description here

    I tried so many things like re-install the docker desktop or WSL updates, but didn't worked.

    And error in the command be like... enter image description here So if someone can help me out with this....plz help me out

  • Danton Heuer
    Danton Heuer almost 3 years
    I have reinstalled the Docker app, but this is indeed the solution that worked for this new version, thanks
  • Fernando Torres
    Fernando Torres almost 3 years
    this solution is working on 2021, plus i have uninstalled all my hyper-v softwares like virtual box, it might be causing conflicts within docker deskptop
  • Jordan Gee
    Jordan Gee over 2 years
    I realized after posting this, that another answer also found to rename/delete the file.. 👍
  • i0707
    i0707 over 2 years
    I had previously installed and uninstalled the docker, probably that's causing the issue, but your solution works perfectly. Thank you
  • Anand
    Anand over 2 years
    Thank you for such a useful comment. And thank you @tocklime for your beautiful answer.
  • Waqas Raja
    Waqas Raja over 2 years
    deleting the %AppData%\Docker folder worked for me
  • some_randomer
    some_randomer over 2 years
    I've got 3 folders within %AppData% - Local, LocalLow, and Roaming. In Local there are folders called "Docker" and "Docker Desktop Installer" and in Roaming there are folders called "Docker" and "Docker Desktop". Which of these do I delete? (FWIW I just uninstalled Docker and all these folders are still there).
  • danday74
    danday74 over 2 years
    same issue as @some_randomer on Windows 10 - I just deleted all of them and it started working (although I did have to reinstall and lost all my containers and images, altho that was cool coz that was what I was trying to do) - thanks all
  • Rem
    Rem over 2 years
    Deleting settings.json in %appdata%\Docker is worked for me. No need to delete entire Docker directory. Just settings.json is enough. Then, open Docker. It should works!
  • FiNaLsPY
    FiNaLsPY about 2 years
    On my side, on the opposite, uninstalling HyperV did the trick : Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor