Skip to content

Commit 113876b

Browse files
mjchi7thaJeztah
andauthored
Update config/containers/container-networking.md
Co-authored-by: Sebastiaan van Stijn <thaJeztah@users.noreply.github.com>
1 parent 0bda4b1 commit 113876b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

config/containers/container-networking.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,17 @@ flag to specify an additional network alias for the container on that network.
5656

5757
## DNS services
5858

59-
By default, a container inherits the DNS settings of the Docker daemon by copying the config file `/etc/resolv.conf` to the container. The file `/etc/hosts` however, are not inherited. To pass additional hosts into your container, see [run command](../../engine/reference/commandline/run.md#add-entries-to-container-hosts-file---add-host). You can override these
59+
By default, a container inherits the DNS settings of the host, as defined in the
60+
`/etc/resolv.conf` configuration file. Containers that use the default `bridge`
61+
network get a copy of this file, whereas containers that use a
62+
[custom network](../../network/network-tutorial-standalone.md#use-user-defined-bridge-networks)
63+
use Docker's embedded DNS server, which forwards external DNS lookups to the DNS
64+
servers configured on the host.
65+
66+
Custom hosts defined in `/etc/hosts` are not inherited. To pass additional hosts
67+
into your container, refer to [add entries to container hosts file](../../engine/reference/commandline/run.md#add-entries-to-container-hosts-file---add-host)
68+
in the `docker run` reference documentation. You can override these settings on
69+
a per-container basis.
6070
settings on a per-container basis.
6171

6272
| Flag | Description |

0 commit comments

Comments
 (0)