podman/pkg
Colin Walters 870eed9378 Use host's resolv.conf if no network namespace enabled
My host system runs Fedora Silverblue 29 and I have NetworkManager's
`dns=dnsmasq` setting enabled, so my `/etc/resolv.conf` only has
`127.0.0.1`.

I also run my development podman containers with `--net=host`
for various reasons.

If we have a host network namespace, there's no reason not to just
use the host's nameserver configuration either.

This fixes e.g. accessing content on a VPN, and is also faster
since the container is using cached DNS.

I know this doesn't solve the bigger picture issue of localhost-DNS
conflicting with bridged networking, but that's far more involved,
probably requiring a DNS proxy in the container.  This patch
makes my workflow a lot nicer and was easy to write.

Signed-off-by: Colin Walters <walters@verbum.org>
2018-11-27 15:28:09 -05:00
..
annotations Spell check strings and comments 2018-05-25 08:45:15 +00:00
apparmor pkg/apparmor: use a pipe instead of a tmp file 2018-08-14 14:25:14 +00:00
chrootuser Generate a passwd file for users not in container 2018-10-12 07:08:13 -04:00
criu Add helper function to read out CRIU version 2018-10-23 12:52:03 +02:00
ctime ctime: Drop 32-/64-bit distinction on Linux 2018-07-07 20:35:00 +00:00
firewall Replace existing iptables handler with firewall code 2018-09-10 18:53:27 +00:00
hooks Change references to cri-o to point at new repository 2018-09-07 17:47:45 +00:00
inspect Add history and namespaceoptions to image inspect 2018-11-26 10:56:55 -05:00
kubeutils Remove dependency on kubernetes 2018-03-27 21:55:33 +00:00
logs Add CRI logs parsing to podman logs 2018-09-05 13:48:20 +00:00
lookup Don't fail if /etc/passwd or /etc/group does not exists 2018-11-07 11:41:51 -05:00
namespaces spec: refactor ns modes to a common interface 2018-09-21 10:13:39 +00:00
netns Fix godoc comment in pkg/netns 2018-07-27 02:48:16 +00:00
registrar Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
registries registries: check user registries file only in rootless mode 2018-11-19 12:11:07 +01:00
resolvconf Use host's resolv.conf if no network namespace enabled 2018-11-27 15:28:09 -05:00
rootless rootless: call IsRootless just once 2018-11-14 10:13:50 +01:00
secrets rootless: create empty mounts.conf if it doesn't exist 2018-11-19 12:58:11 +01:00
spec Allow users to expose ports from the pod to the host 2018-11-20 09:49:34 -06:00
util rootless: create storage.conf when it doesn't exist 2018-11-19 12:11:06 +01:00
varlinkapi Lint: InspectImage varlink api should return errors that occurred 2018-11-10 10:52:24 +01:00