Docker failed to initialize

I got that message after an update (a few months ago). It concerned me a bit because I thought I had set up all the WSL stuff already but I followed the instructions at the link and it worked.

This worked for me. Thank you Anh

[SOLVED]. Thanks it worked for me. I mean Editing the C:\Users\arun\AppData\Roaming\Docker\Setting.json and removing proxyHttpMode and save it. Resolved the problem.

1 Like

It Works!!! but only delete settings.json in C:\Users[USER]\AppData\Roaming\Docker

1 Like

It work for me.
Thanks so much

thanks, its work for me too

thank you this fixed it.

I to got the same error docker

Thanks! It works for me :sunglasses:

It worked! Thank you!

It’s great to see it works for many people :slight_smile:

Thanks. It solved my problem!

In my case, for some reason %USER%\AppData\Roaming\settings.json was full of null characters (00 in hex). Deleting it seems to have resolved at least this initial issue, although as of now a few moments later Docker Engine failed to start with an unhandled .Net exception…

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Threading.Tasks.TaskCanceledException: Cancellation token triggered before we finished reading from the stream.
   at HttpOverStream.ByLineReader.<ReadLineAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

etc etc etc

Reinstalling Docker appears ok though.

This worked for me, cool.

I have uninstalled Docker, deleted the two AppData folders for Docker in Roaming & Local.

Reinstalled it fresh with no folders previous.

Still am getting this Docker failed to initialize.

It’s only happened since I did the last update to Docker now I can’t get in.

Except I have found it never shuts down. If you try to delete the folders after you got this error it says it’s still active.

Edit: I have only been able to fix this by rolling it back multiple versions to the December release. Now I can have it running.

This is Pissing me off, I’ve had this happen to me on 3 different versions, I tried deleting the folders in local/roaming to no avail. the only way I’ve gotten it to work is by purging it from my system (I have Revo Uninstaller) and re-installing it like new. then a couple of days later I had it fail to initialize again… why is this such a reoccurring problem?

What I did to solve this issue was to :

  • uninstall docker desktop,
  • delete all keys related to docker that remained in my registry (regedit, then search for docker and delete entries/keys - except control state ones)
  • deleted any remaining content about docker in %APPDATA%
  • then uninstall HyperV by following instructions here : How to disable Hyper V
  • reboot
  • reinstall docker desktop, chose wsl2 instead of hyperv when prompted … and voila !

Seems uninstaling HyperV did the trick as I tried all other steps together as previously suggested by some folks but even if installation said it was successfull, I still got the “initialization failed message”

Hope this helps some of you.

:clap: :clap: :clap: This worked for me. Thanks a lot!

Hi guys! I had the same problem and I fixed it giving write permissions to the file. When I checked the logs file (on C:\Users[USER]\AppData\Local\Docker\log.txt) I could see that the problem was permissions on the “config.json” file. I have read that other persons have the same issue on the “settings.json” file as well, but I think that the same solution will work

I faced a similar problem in my case the log{some-number}.txt file looked like this:
[2022-05-21T13:40:11.761695200Z][GUI ][Info ] Starting... [2022-05-21T13:40:11.804267800Z][GUI ][Warning] Failed to configure docker scan: System.UnauthorizedAccessException: Access to the path 'C:\Users\YOURUSERNAME\.docker\scan\config.json' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

My Configuration:
OS: Microsoft Windows Version22H2 (OS Build 22621.1)
Docker Version: 4.8.2(79419)

I have a habit of hiding folders that begin with . so I hid my .docker which led to some permission issues I guess which is what I saw in my log file so I simply made my .docker folder visible and then started Docker again and this time it is working.

A lot of people are saying that they are also facing permission issues I would suggest that you try to take ownership of that folder and then start Docker and every time the Docker initialization fails make sure to look into the log{highest-number}.txt file and try to find the root of the problem because people are getting the same error which is about Docker initialization but the cause of error seems to be different some are getting an error because of proxyHttpvalue `
msg=“error during migrations: proxyHttpMode must be a boolean value”
others like me are getting the same error due to a different reason so please take a look at your log file then come here and tell us about your problem.

1 Like