From 3e5ac730a8214cc1f3e316dd119f679d78b8b019 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 28 Jan 2013 17:32:15 -0800 Subject: [PATCH] Networking: Mount bind (ro) the host's /etc/resolv.conf into the container in order to get networking. Upstream-commit: 54a946e333077f59c8e6eb0663ab3e138a9e8320 Component: engine --- components/engine/lxc_template.go | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 components/engine/lxc_template.go diff --git a/components/engine/lxc_template.go b/components/engine/lxc_template.go old mode 100644 new mode 100755 index 38aba72b31..d9e79830f9 --- a/components/engine/lxc_template.go +++ b/components/engine/lxc_template.go @@ -73,6 +73,9 @@ lxc.mount.entry = devpts {{.Filesystem.RootFS}}/dev/pts devpts newinstance,ptmxm #lxc.mount.entry = varlock {{.Filesystem.RootFS}}/var/lock tmpfs size=1024k,nosuid,nodev,noexec 0 0 #lxc.mount.entry = shm {{.Filesystem.RootFS}}/dev/shm tmpfs size=65536k,nosuid,nodev,noexec 0 0 +# In order to get a working DNS environment, mount bind (ro) the host's /etc/resolv.conf into the container +lxc.mount.entry = /etc/resolv.conf {{.Filesystem.RootFS}}/etc/resolv.conf none bind,ro 0 0 + # drop linux capabilities (apply mainly to the user root in the container) lxc.cap.drop = audit_control audit_write mac_admin mac_override mknod net_raw setfcap setpcap sys_admin sys_boot sys_module sys_nice sys_pacct sys_rawio sys_resource sys_time sys_tty_config