Browse code

Merge pull request #31291 from albers/docs-daemon-hosts

Clarify why `hosts` in `daemon.json` does not work
(cherry picked from commit 27c9a6e9c22a6cf0c6dae7f59cf8f7d56a67f560)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Brian Goff authored on 2017/02/24 00:47:26
Showing 1 changed files
... ...
@@ -1205,6 +1205,13 @@ This is a full example of the allowed configuration options on Linux:
1205 1205
 }
1206 1206
 ```
1207 1207
 
1208
+> **Note:** You cannot set options in `daemon.json` that have already been set on
1209
+> daemon startup as a flag.
1210
+> On systems that use `systemd` to start the Docker daemon, `-H` is already set, so
1211
+> you cannot use the `hosts` key in `daemon.json` to add listening addresses.
1212
+> See https://docs.docker.com/engine/admin/systemd/#custom-docker-daemon-options for how
1213
+> to accomplish this task with a systemd drop-in file.
1214
+
1208 1215
 ##### On Windows
1209 1216
 
1210 1217
 The default location of the configuration file on Windows is