Merge pull request #4819 from dvdksn/25.0_backport_docs_host-gateway-ip_daemonjson

[25.0 backport] docs: update host-gateway-ip to use daemon.json instead of cli flag
This commit is contained in:
Sebastiaan van Stijn 2024-01-23 16:11:10 +01:00 committed by GitHub
commit 29cf629222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -849,7 +849,9 @@ flag for the dockerd command line interface, or the `host-gateway-ip` key in
the daemon configuration file. the daemon configuration file.
```console ```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 \ $ docker run -it --add-host host.docker.internal:host-gateway \
busybox ping host.docker.internal busybox ping host.docker.internal
PING host.docker.internal (192.0.2.0): 56 data bytes 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": "",
"fixed-cidr-v6": "", "fixed-cidr-v6": "",
"group": "", "group": "",
"host-gateway-ip": "",
"hosts": [], "hosts": [],
"proxies": { "proxies": {
"http-proxy": "http://proxy.example.com:80", "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": {}, "features": {},
"fixed-cidr": "", "fixed-cidr": "",
"group": "", "group": "",
"host-gateway-ip": "",
"hosts": [], "hosts": [],
"insecure-registries": [], "insecure-registries": [],
"labels": [], "labels": [],