From 3fa24909ed288b01b581aff334baa7005a340147 Mon Sep 17 00:00:00 2001 From: sanghun Date: Thu, 23 Jul 2026 01:30:20 +0900 Subject: [PATCH] docs: explain how to set bridge network driver options Reword the "Bridge driver options" section to note that driver options are configured with the --opt flag, and reframe the IP masquerade snippet as a generic example of setting a bridge driver option. Signed-off-by: sanghun --- docs/reference/commandline/network_create.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/reference/commandline/network_create.md b/docs/reference/commandline/network_create.md index ac493a844e10..55c9115c132f 100644 --- a/docs/reference/commandline/network_create.md +++ b/docs/reference/commandline/network_create.md @@ -149,9 +149,10 @@ fails and Docker Engine returns an error. ### Bridge driver options -When creating a custom `bridge` network, the following additional options can -be passed. Some of these have equivalent flags that can be used on the dockerd -command line or in `daemon.json` to configure the default bridge, `docker0`: +When creating a custom `bridge` network, you can configure driver options using +the `--opt` flag. Some of these options have equivalent flags that can be used +on the dockerd command line or in `daemon.json` to configure the default bridge, +`docker0`: | Network create option | Daemon option for `docker0` | Description | |--------------------------------------------------|-----------------------------|-------------------------------------------------------| @@ -162,6 +163,15 @@ command line or in `daemon.json` to configure the default bridge, `docker0`: | `com.docker.network.driver.mtu` | `--mtu` | Set the containers network MTU | | `com.docker.network.container_iface_prefix` | - | Set a custom prefix for container interfaces | +For example, to create a custom `bridge` network with IP masquerading disabled: + +```console +$ docker network create \ + --driver bridge \ + --opt com.docker.network.bridge.enable_ip_masquerade=false \ + no-masq-network +``` + The following arguments can be passed to `docker network create` for any network driver, again with their approximate equivalents to Docker daemon flags used for the `docker0` bridge: