41

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?

error404
  • 2,684
  • 2
  • 13
  • 21
AnjK
  • 2,887
  • 7
  • 37
  • 64

3 Answers3

90

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

Code
  • 6,041
  • 4
  • 35
  • 75
Johannes Buchholz
  • 1,857
  • 19
  • 34
  • 3
    Thanks for the answer! Actually I have the file there itself. But after editing this file, docker always fails to start. Then docker started only after resetting docker to factory defaults (Because it reverts the changes i made to the daemon.json file). – AnjK Mar 26 '19 at 09:09
  • In the Docker setting in the Deamon category you can switch to Advanced and also edit the deamon.json file. Maybe edit it there to be sure to edit the correct one. – Johannes Buchholz Mar 26 '19 at 10:47
  • Actually the problem is, i want to change the settings of docker desktop ( such as exposing the daemon to 2375 tcp port) without using GUI. That's why i thought to edit the daemon.json file. This is for the purpose of automation. – AnjK Mar 26 '19 at 12:03
  • 1
    @JohannesBuchholz it still fails to restart after modifying the values directly from the Docker console. Is there any other way to achieve this? – Vinay Limbare May 21 '20 at 16:14
  • Running Docker Desktop elevated to admin solved for me @AnjanaAK – Raul Chiarella Sep 11 '22 at 19:34
2

Right click Docker icon in taskbar > Click Settings > Click Docker Engine

You can update that, and it should work. I'm on Docker Engine v19.03.8.

Nhon Ha
  • 433
  • 4
  • 5
1

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.

MiguelSlv
  • 14,067
  • 15
  • 102
  • 169