From 6e26e75ead587d0721ed05d1b78d5fe72874d5b8 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 23 Feb 2017 13:49:00 +0100 Subject: [PATCH] Clarify why `hosts` in `daemon.json` does not work Signed-off-by: Harald Albers Upstream-commit: 340b75dd41d026e6f6072da851930d6802a1ee34 Component: engine --- components/engine/docs/reference/commandline/dockerd.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/engine/docs/reference/commandline/dockerd.md b/components/engine/docs/reference/commandline/dockerd.md index e42b7340f7..92b9349a41 100644 --- a/components/engine/docs/reference/commandline/dockerd.md +++ b/components/engine/docs/reference/commandline/dockerd.md @@ -1208,6 +1208,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