From ec0a62436e180c3102e6a1977e26ae61ba7cb237 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:12:33 +0100 Subject: [PATCH] docs: update host-gateway-ip to use daemon.json instead of cli flag Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/dockerd.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/dockerd.md b/docs/reference/commandline/dockerd.md index 9e9fd332f328..00397b7be89a 100644 --- a/docs/reference/commandline/dockerd.md +++ b/docs/reference/commandline/dockerd.md @@ -849,7 +849,9 @@ flag for the dockerd command line interface, or the `host-gateway-ip` key in the daemon configuration file. ```console -$ dockerd --host-gateway-ip 192.0.2.0 +$ cat > /etc/docker/daemon.json +{ "host-gateway-ip": "192.0.2.0" } +$ sudo systemctl restart docker $ docker run -it --add-host host.docker.internal:host-gateway \ busybox ping host.docker.internal PING host.docker.internal (192.0.2.0): 56 data bytes @@ -1072,6 +1074,7 @@ The following is a full example of the allowed configuration options on Linux: "fixed-cidr": "", "fixed-cidr-v6": "", "group": "", + "host-gateway-ip": "", "hosts": [], "proxies": { "http-proxy": "http://proxy.example.com:80", @@ -1181,6 +1184,7 @@ The following is a full example of the allowed configuration options on Windows: "features": {}, "fixed-cidr": "", "group": "", + "host-gateway-ip": "", "hosts": [], "insecure-registries": [], "labels": [],