'Docker failed to initialize

I am trying to install the Docker community edition for windows, the installation was successful and it asked me to logout and login again and I did same. But when I tried to start the docker it says -

A task was canceled. at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) at Docker.WPF.BackendClient.Version() at Docker.Program.Run(IReadOnlyCollection`1 args)

It is giving me below options -

Docker Error

Any help or pointers will really helpful.



Solution 1:[1]

Deleting C:\Users\UserName\AppData\Roaming\Docker folder also resolved my issue.

Solution 2:[2]

I did finally solve the problem and the solution was to restart the machine, which was not properly documented in the official site. As per the site -

Install

Double-click InstallDocker.msi to run the installer.

When the installation finishes, Docker starts automatically. The whale in the notification area indicates that Docker is running, and accessible from a terminal. Run

Open a command-line terminal like PowerShell, and try out some Docker commands!

Run docker version to check the version.

Run docker run hello-world to verify that Docker can pull and run images.

However it needs a restart to enable virtualization, simply logging off and login again did not work for me as directed by the wizard. Most of the problems related to docker gets resolved by restarting the docker some of the common problems and the resolutions are as follows

  • Docker not starting in windows or not working properly
    • Change it to Linux containers
  • Make sure that docker is installed on machine
  • Make sure virtualization is enabled and docker starts successfully

Solution 3:[3]

Just Remove all files under this paths:

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

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

Solution 4:[4]

Proxy was the culprit in my case:

In the log file in %LOCALAPPDATA%\Docker,

[11:43:09.152][GoBackendProcess ][Error ] msg=“while parsing JSON from C:\Users[USER]\AppData\Roaming\Docker\settings.json: json: cannot unmarshal bool into Go struct field Content.proxyHttpMode of type string”

Open %APPDATA%\Docker\settings.json

I removed all settings lines related to proxy, and the service started fine.

Alternatively, you can delete the following directories:

%LOCALAPPDATA%\Docker
%APPDATA%\Docker
%APPDATA%\Docker Desktop

Solution 5:[5]

**

Just Delete the files in C:\Users\xxxxxxx\AppData\Roaming\Docker fixed it

It helps me !!!

**

Solution 6:[6]

I had a similar issues generated by the following error described in the C:\Users\<myuser>\AppData\Local\Docker\log.txt:

[12:35:12.988][GUI               ][Warning] Failed to configure docker scan: System.UnauthorizedAccessException: O acesso ao caminho 'C:\Users\<myuser>\.docker\scan\config.json' foi negado.
   em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

To solve that I just dropped the folder located at C:\Users\<myuser>\.docker and run the Docker Desktop again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 buddemat
Solution 2
Solution 3 Shubham Gorlewar
Solution 4 Jayesh Mann
Solution 5 Suraj Verma
Solution 6 Lucas Venezian Povoa