[Fixed] Docker Failed to Initialize on Windows – Docker

Photo of author
Written By M Ibrahim
boot2docker docker-for-windows

Quick Fix: Delete the folder %appdata%\Docker. This action will remove any corrupted data or configurations that may be causing Docker to fail during initialization.

The Problem:

You’re having trouble pulling a Docker image called "docker-dev" for setting up your development environment. When attempting to pull the image, you encountered an error that says "docker manifest not found." Despite trying various solutions such as reinstalling Docker Desktop and updating WSL, the issue persists. You’re looking for assistance in understanding and resolving this error.

The Solutions:

Solution 1: Delete “%appdata%\Docker” folder

If you’re encountering the “docker failed to initialize” error on Windows, one potential solution is to delete the “%appdata%\Docker” folder. This folder stores Docker’s configuration and data, and deleting it can help resolve initialization issues.

Solution 2: Fix the corrupted settings.json file

The issue of Docker failing to initialize might be due to a corrupted settings.json file, often seen in the %appdata%\Docker directory. To fix this:

  1. Locate the settings.json file: Open the File Explorer and navigate to the directory %appdata%\Docker.

  2. Backup the settings.json file: Before making any changes, it’s a good practice to create a backup of the original file in case you need to revert. You can copy and paste the file to a different location, or rename it to something like settings.json.backup.

  3. Delete the settings.json file: Once you have a backup, you can delete the original settings.json file.

  4. Restart the Docker service: If the Docker service is running, restart it. Otherwise, start it if it’s not already running. This will prompt Docker to create a new settings.json file with the default values.

  5. Reconfigure Docker settings: Use the Docker GUI or command-line interface (CLI) to reconfigure Docker settings as needed. Your previous custom settings may need to be re-applied.

  6. Test Docker functionality: Once the settings are reconfigured, check if Docker is functioning properly by running commands like "docker ps" or "docker build" to ensure that the initialization issue is resolved.

Solution 3: Delete the `settings.json` File

  1. Navigate to the directory C:\Users——-\AppData\Roaming\Docker
  2. Locate and delete the file settings.json
  • Docker will automatically create a new settings.json file upon startup.
  • This action has been known to resolve issues with Docker failing to initialize.

Solution 5: Deleting Docker Directories

If you’re facing the “Docker failed to initialize” error, you can try deleting the following directories:

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

Make sure to replace [USER] with your actual username.

After deleting these directories, restart Docker Desktop. It should then start booting up normally.