From 58ded672edfe9d72bc8f31304a136cd3105876c5 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Wed, 9 Oct 2013 16:40:46 -0400 Subject: [PATCH] Fixes issues with mounting subdirectories of /mnt in container. Tested with mkdir /mnt/data docker run -v /mnt/data:/mnt/data -t ubuntu:12.10 touch /mnt/data/bar Expected /mnt/data/bar on host. Upstream-commit: aa3697520a916ce2de525e020d2afa0bbd102df2 Component: engine --- components/engine/lxc_template.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/engine/lxc_template.go b/components/engine/lxc_template.go index 0e2dfafd47..37232a89d3 100644 --- a/components/engine/lxc_template.go +++ b/components/engine/lxc_template.go @@ -81,6 +81,8 @@ lxc.cgroup.devices.allow = c 10:200 rwm {{end}} # standard mount point +# Use mnt.putold as per https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/986385 +lxc.pivotdir = lxc_putold # WARNING: procfs is a known attack vector and should probably be disabled # if your userspace allows it. eg. see http://blog.zx2c4.com/749 lxc.mount.entry = proc {{$ROOTFS}}/proc proc nosuid,nodev,noexec 0 0