projectatomic / oci-systemd-hook

OCI hook to enable running systemd in a container
GNU General Public License v3.0
64 stars 26 forks source link

mount using :shared may cause crashes #64

Open jshachm opened 7 years ago

jshachm commented 7 years ago

docker run -it --rm --cap-add sys_admin -v /var/lib/lxc/:/var/lib/lxc/:ro,shared -v /var/lib/lxc/lxcfs/proc/meminfo:/proc/meminfo:rw -m 100m centos:tag /sbin/init Causes a crash :

Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:393: container init caused \"process_linux.go:376: running prestart hook 1 caused \\\"error running hook: exit status 1, stdout: , stderr: \\\"\"".

rhatdan commented 7 years ago

Could you try this with SELinux disabled? Could be an selinux issue?

wangdb123 commented 7 years ago

man mount “Note also that moving a mount residing under a shared mount is invalid and unsupported. ”