Skip to content

Commit

Permalink
docs: update host-gateway-ip to use daemon.json instead of cli flag
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
  • Loading branch information
dvdksn committed Jan 23, 2024
1 parent c89975d commit 06b5db9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/reference/commandline/dockerd.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06b5db9

Please sign in to comment.