From 0fde22482a4579693ea636456cec367ada04a103 Mon Sep 17 00:00:00 2001 From: Andreas Heck Date: Thu, 11 Apr 2024 11:27:31 +0200 Subject: [PATCH] Update docs for host networking (#19783) * Update docs for host networking * Update content/desktop/networking.md --------- Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> --- content/desktop/networking.md | 3 +++ content/network/network-tutorial-host.md | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/content/desktop/networking.md b/content/desktop/networking.md index 17d0de71bc..fc8cf33bd4 100644 --- a/content/desktop/networking.md +++ b/content/desktop/networking.md @@ -185,5 +185,8 @@ container to random ports on the host. $ docker run -d -P --name webserver nginx ``` +Alternatively, you can also use [host networking](../network/drivers/host.md#docker-desktop) +to give the container direct access to the network stack of the host. + See the [run command](../reference/cli/docker/container/run.md) for more details on publish options used with `docker run`. diff --git a/content/network/network-tutorial-host.md b/content/network/network-tutorial-host.md index c575dededc..ce1c0c34d0 100644 --- a/content/network/network-tutorial-host.md +++ b/content/network/network-tutorial-host.md @@ -23,8 +23,10 @@ host. Nginx listen on a different port, see the [documentation for the `nginx` image](https://hub.docker.com/_/nginx/) -- The `host` networking driver only works on Linux hosts, and is not supported - on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server. +- The `host` networking driver only works on Linux hosts, but is availabe as a + [beta feature](../../release-lifecycle.md#beta) on Docker Desktop version 4.29 + and later for Mac, Windows, and Linux. To enable this feature, navigate to the + **Features in development** tab in **Settings**, and then select **Enable host networking**. ## Procedure @@ -63,4 +65,4 @@ host. - [Standalone networking tutorial](network-tutorial-standalone.md) - [Overlay networking tutorial](network-tutorial-overlay.md) -- [Macvlan networking tutorial](network-tutorial-macvlan.md) \ No newline at end of file +- [Macvlan networking tutorial](network-tutorial-macvlan.md)