How to Solve Error Message Docker Failed to Initialize

Posted on

Introduction

This is an article where the main topic is to show how to solve an error message while running Docker Desktop application in Microsoft Windows 10. The error message appear as a Window information box. That error message is ‘Docker failed to Initialize’. The appearance of that window information box containing the error message ‘Docker Failed to Initialize’ appear as below :

How to Solve Error Message Docker Failed to Initialize

There is also another additional information regarding about the error message exist above. The execution of a specific docker command in the command line interface or in the command prompt resulting on a specific another different and detail message. That error message exist as follows :

C:\Users\Administrator>docker container list --all
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1": open //./pipe/docker_engine: The system cannot find the file specified.
C:\Users\Administrator>docker image list --all
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/json?all=1": open //./pipe/docker_engine: The system cannot find the file specified.
C:\Users\Administrator>

Solution

Basically, in order to solve the above message, there are several attempt in sequences which is taken. The following are those attempt in sequence :

  1. Executing a certain command according to some reference after searching it in google. There is a resource about how to solve it in stackoverflow.com. The following is the command to solve it :

    (c) 2019 Microsoft Corporation. All rights reserved.
    C:\Users\Administrator>cd \
    C:\>cd "Program Files"
    C:\Program Files>cd Docker
    C:\Program Files\Docker>cd Docker
    C:\Program Files\Docker\Docker>DockerCli.exe -SwitchDaemon
    C:\Program Files\Docker\Docker>
    

    Apparently, the above solution is not working.

  2. Next, stop and start the Docker service from the Service Configuration Panel as in the following image :

    How to Solve Error Message Docker Failed to Initialize
  3. Another step is by deleting the settings.json file. It exist in C:\Users\Administrator\AppData\Roaming\Docker in this article’s context. The location can be different for each PC, laptop or machine. But normally, it is in the ‘Users’ home with the additional path of ‘AppData\Docker’, ‘AppData\Local\Docker’ or some other patterns.

  4. After deleting the settings.json file, just restart the PC, laptop and machine.

  5. Moreover, after finishing on the restart process, just run the Docker Desktop application. Apparently, the following image appear :

    How to Solve Error Message Docker Failed to Initialize

    Apparently, erasing the ‘settings.json’ file is resetting the Docker Desktop application itself. So, just click the checkbox I accept the terms. The ‘Accept’ button will be visible.

    How to Solve Error Message Docker Failed to Initialize
  6. Just click the ‘Accept’ button and the Docker Desktop application will available for further usage as follows :

    How to Solve Error Message Docker Failed to Initialize

    Apparently, the process to start the Docker Desktop application ends in a failure as in the following image :

    How to Solve Error Message Docker Failed to Initialize

    So, without having a second thought because of the reason to try practical way, just click the ‘Reset to factory defaults’ button. After clicking the ‘Reset to factory defaults’ button, the following image will appear :

    How to Solve Error Message Docker Failed to Initialize

    Just click the ‘Reset’ button to be able to reset all of Docker properties to stay away from the hassle of troubleshooting. But if the troubleshooting attempt is an alternative to take, click the ‘Cancel’ button. In this case, the chosen option is by clicking the ‘Reset’ button. The following is the appearance of the window dialog box appear :

    How to Solve Error Message Docker Failed to Initialize
  7. If the update process in the above step is taking too much time, just restart the Windows operating system. It should be able to run the Docker Desktop application properly.

Leave a Reply