engine: clarify daemon.json config file location

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-01-11 13:45:34 +01:00
parent 99a6f04112
commit c013eac2c6
1 changed files with 22 additions and 8 deletions

View File

@ -48,17 +48,31 @@ You can use both of these options together as long as you don't specify the same
option both as a flag and in the JSON file. If that happens, the Docker daemon option both as a flag and in the JSON file. If that happens, the Docker daemon
won't start and prints an error message. won't start and prints an error message.
To configure the Docker daemon using a JSON file, create a file at ### Configuration file
`/etc/docker/daemon.json` on Linux systems, or
`C:\ProgramData\docker\config\daemon.json` on Windows.
Using this configuration file, run the Docker daemon in debug mode, using TLS, and The following table shows the location where the Docker daemon expects to find
listen for traffic routed to `192.168.59.3` on port `2376`. You can learn what the configuration file by default, depending on your system and how you're
configuration options are available in the running the daemon.
| OS and configuration | File location |
| -------------------- | ------------------------------------------ |
| Linux, regular setup | `/etc/docker/daemon.json` |
| Linux, rootless mode | `~/.config/docker/daemon.json` |
| Windows | `C:\ProgramData\docker\config\daemon.json` |
For rootless mode, the daemon respects the `XDG_CONFIG_HOME` variable. If set,
the expected file location is `$XDG_CONFIG_HOME/docker/daemon.json`.
You can also explicitly specify the location of the configuration file on
startup, using the `dockerd --config-file` flag.
You can learn what configuration options are available in the
[dockerd reference docs](../../engine/reference/commandline/dockerd.md#daemon-configuration-file) [dockerd reference docs](../../engine/reference/commandline/dockerd.md#daemon-configuration-file)
You can also start the Docker daemon manually and configure it using flags. This ### Configuration using flags
can be useful for troubleshooting problems.
You can also start the Docker daemon manually and configure it using flags.
This can be useful for troubleshooting problems.
Here's an example of how to manually start the Docker daemon, using the same Here's an example of how to manually start the Docker daemon, using the same
configurations as shown in the previous JSON configuration: configurations as shown in the previous JSON configuration: