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

3

46

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?

Stela answered 26/3, 2019 at 7:18 Comment(0)
F
108

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

Footplate answered 26/3, 2019 at 8:39 Comment(5)
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).Stela
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.Footplate
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.Stela
@JohannesBuchholz it still fails to restart after modifying the values directly from the Docker console. Is there any other way to achieve this?Beaman
Running Docker Desktop elevated to admin solved for me @AnjanaAKBorax
H
3

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.

Hanako answered 16/5, 2020 at 6:16 Comment(0)
B
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.

Brasil answered 22/5, 2020 at 17:56 Comment(1)
This seems to only apply to windows containers, or rather the version of docker hosting themFootplate

© 2022 - 2024 — McMap. All rights reserved.