From ef658fa65ecc41eea65b85c6a51a7b839a164d1b Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 23 Feb 2017 10:47:26 -0500 Subject: [PATCH] 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 --- docs/reference/commandline/dockerd.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/reference/commandline/dockerd.md b/docs/reference/commandline/dockerd.md index f515dc7cb8..02ae647785 100644 --- a/docs/reference/commandline/dockerd.md +++ b/docs/reference/commandline/dockerd.md @@ -1205,6 +1205,13 @@ This is a full example of the allowed configuration options on Linux: } ``` +> **Note:** You cannot set options in `daemon.json` that have already been set on +> daemon startup as a flag. +> On systems that use `systemd` to start the Docker daemon, `-H` is already set, so +> you cannot use the `hosts` key in `daemon.json` to add listening addresses. +> See https://docs.docker.com/engine/admin/systemd/#custom-docker-daemon-options for how +> to accomplish this task with a systemd drop-in file. + ##### On Windows The default location of the configuration file on Windows is