I need to edit my docker daemon's config, and from what I'm readong there are 2(?) that I 'can' use?
One path:
C:\ProgramData\Docker\config\daemon.json
Other path:
C:\Program Files\Docker\Docker\resources\windows-daemon-options.json
First question:
windows-daemon-options.json
already exists and has data in it (more on that below)daemon.json
doesn't exist; I'd have to create itSo, do I just edit the windows-daemon-options.json
, or do I create the daemon.json
, and either just do in my edits, and then on daemon startup it'll sort of use the former as the "base" config and overwrite just the settings added with the latter? OR do I copy/paste ALL of the settings from the former to the latter, edit what I need, and then upon startup it'll use the regular daemon.json
as the preferred config (sort of as if the former were a sample config)?
Second Question:
The data in windows-daemon-options.json
has a lot of "redacted" in it, I'm wondering how that all figures into all of this?
i.e. here's the data in it (literally):
{
"allow-nondistributable-artifacts": ["host_port_or_cidr|redacted"],
"authorization-plugins": [],
"bridge": "",
"cluster-advertise": "",
"cluster-store": "",
"data-root": "path|redacted",
"debug": true,
"default-ulimits": {},
"disable-legacy-registry": false,
"dns": ["ip|redacted"],
"dns-opts": [],
"dns-search": ["domain|redacted"],
"exec-opts": [],
"experimental": true,
"fixed-cidr": "redacted",
"graph": "deprecated|redacted",
"group": "",
"hosts": ["endpoint|redacted"],
"insecure-registries": ["host_port_or_cidr|redacted"],
"labels": [],
"live-restore": true,
"log-driver": "",
"log-level": "",
"max-concurrent-downloads": 3,
"max-concurrent-uploads": 5,
"metrics-addr":"endpoint|redacted",
"mtu": 0,
"pidfile": "redacted",
"raw-logs": false,
"registry-mirrors": ["registry|redacted"],
"shutdown-timeout": 15,
"storage-driver": "",
"storage-opts": [],
"swarm-default-advertise-addr": "endpoint|redacted",
"tlscacert": "redacted",
"tlscert": "redacted",
"tlskey": "redacted",
"tlsverify": true
}
Hopefully I was able to clearly convey my questions.
When you start Docker Desktop in Windows container mode, if C:\ProgramData\Docker\config\daemon.json
does not exist, it will get created with some default values.
You can create it beforehand or edit it afterwards (and restart Docker Desktop).
Or you can use the UI (Settings / Docker Engine), which validates the changes.
C:\Program Files\Docker\Docker\resources\windows-daemon-options.json
is the schema internal file used for validation there, you probably don’t want to change it.
See also https://docs.docker.com/docker-for-windows/#docker-engine