Files
podman/docs/source/markdown/options/dns.md
Paul Holzinger 070d7c3ad3 Revert "Rewrite the Quadlet documentation."
This reverts commit c12b1b32bc.

The content contains incorrect information and misses a lot of details
from the previous page that must be restored.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-09-11 19:00:19 +02:00

19 lines
1.0 KiB
Markdown

####> This option file is used in:
####> podman build, create, farm build, run
####> If file is edited, make sure the changes
####> are applicable to all of those.
#### **--dns**=*ipaddr*
Set custom DNS servers.
This option can be used to override the DNS
configuration passed to the container. Typically this is necessary when the
host DNS configuration is invalid for the container (e.g., **127.0.0.1**). When this
is the case the **--dns** flag is necessary for every run.
The special value **none** can be specified to disable creation of _/etc/resolv.conf_ in the container by Podman.
The _/etc/resolv.conf_ file in the image is then used without changes.
Note that **ipaddr** may be added directly to the container's _/etc/resolv.conf_.
This is not guaranteed though. For example, passing a custom network whose *dns_enabled* is set to *true* to **--network** will result in _/etc/resolv.conf_ only referring to the aardvark-dns server. aardvark-dns then forwards to the supplied **ipaddr** for all non-container name queries.