Skip to content

Commit 8ad69cc

Browse files
authored
docs: update port binding documentation
1 parent 91abbc3 commit 8ad69cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/get-started/docker-concepts/running-containers/publishing-ports.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Now, any traffic sent to port `8080` on your host machine will be forwarded to p
3636

3737
> [!IMPORTANT]
3838
>
39-
> When a port is published, it's published to all network interfaces by default. This means any traffic that reaches your machine can access the published application. Be mindful of publishing databases or any sensitive information. [Learn more about published ports here](/engine/network/#published-ports).
39+
> When a port is published, it's published to all network interfaces by default. This means any traffic that reaches your machine can access the published application. Be mindful of publishing databases or any sensitive information. See [Binding to specific network interfaces](#binding-to-specific-network-interfaces) below, and [learn more about published ports here](/engine/network/#published-ports).
4040
4141
### Binding to specific network interfaces
4242

@@ -86,7 +86,7 @@ services:
8686
- "127.0.0.1:5432:5432"
8787
```
8888
89-
This configuration ensures your database is only accessible from the host machine itself, adding a layer of security to your application stack.
89+
This configuration ensures your database is only accessible from the host machine itself, adding a layer of security to your application stack. You can also set a default bind address for all containers using the `host_binding_ipv4` configuration parameter. This allows you to change the default binding from `0.0.0.0` to a specific IP address. For more information, see [Setting the default bind address for containers](/engine/network/packet-filtering-firewalls/#setting-the-default-bind-address-for-containers).
9090

9191
### Publishing to ephemeral ports
9292

0 commit comments

Comments
 (0)