How to setup podman container with custom dns entries in Red Hat Enterprise Linux ?

Solution Verified - Updated -

Issue

  • Why podman adds 8.8.8.8 public dns server to container's /etc/resolv.conf when no DNS is present on container host ?
  • In a non-DNS environment, dns queries to external DNS server's should not be send and if possible resolve statically using /etc/hosts file

Environment

  • Red Hat Enterprise Linux 7/8/9
  • podman

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content