Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find the daemon.json file in windows 10 after docker-desktop installation

I installed the docker-desktop in windows 10 using the installer. Now i want to see the configuration file daemon.json. The official documentation says that

The default location of the configuration file on Windows is %programdata%\docker\config\daemon.json

But i cannot find a folder %programdata%\docker.Instead, the folder C:\ProgramData\DockerDesktop exists. But that doesn't have a daemon.json file in it.

Can someone help me to find why this is so and where can i find daemon.json?

like image 378
AnjanaAK Avatar asked Mar 26 '19 07:03

AnjanaAK


People also ask

Where is Docker daemon json in Windows?

The configuration file can be found at 'C:\ProgramData\Docker\config\daemon. json'.

Where is Docker daemon json located?

Edit the daemon. json file, which is usually located in /etc/docker/ . You may need to create this file, if it does not yet exist.

How do I enable Docker daemon in Windows?

To start Docker in daemon mode, choose Application > Start "Docker Daemon". The state should transition to "Running" after a few seconds and Docker Daemon should be accessible over the remote bridge. That's it! Next time your computer boots, Docker Daemon will start up immediately, before anyone logs on.

How to configure Docker daemon using JSON file?

To configure the Docker daemon using a JSON file, create a file at /etc/docker/daemon.json on Linux systems, or C:\ProgramData\docker\config\daemon.json on Windows. On MacOS go to the whale in the taskbar > Preferences > Daemon > Advanced. Here’s what the configuration file looks like:

Why is my Docker daemon not running on Windows?

In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. OR if you see any of the below windows while running, Resolution 1: Restart Docker service . This error meant the docker daemon is unreachable.

Where are Docker daemon files stored on Windows?

C:\ProgramData\docker on Windows. You can configure the Docker daemon to use a different directory, using the data-root configuration option. Since the state of a Docker daemon is kept on this directory, make sure you use a dedicated directory for each daemon.

How do I debug a docker daemon?

The recommended approach is to set the debug key to true in the daemon.json file. This method works for every Docker platform. Edit the daemon.json file, which is usually located in /etc/docker/ . You may need to create this file, if it does not yet exist. On macOS or Windows, do not edit the file directly.


2 Answers

On my system the file is at %userprofile%\.docker\daemon.json.

like image 182
Johannes Buchholz Avatar answered Oct 21 '22 04:10

Johannes Buchholz


The path C:\ProgramData\Docker\config\daemon.json, as described in Microsoft documentation, is correct, or also correct.

I think the file is not created until you change it on GUI. Once you change it on GUI,the file will be were is supposed with the exact content you apply.

like image 1
MiguelSlv Avatar answered Oct 21 '22 02:10

MiguelSlv