我正在使用带有 lxc-container-default-with-nesting 配置文件的嵌套 LXC,如下所示。
profile lxc-container-default-with-nesting flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/lxc/container-base>
#include <abstractions/lxc/start-container>
# Uncomment the line below if you are not using cgmanager
# mount fstype=cgroup -> /sys/fs/cgroup/**,
deny /dev/.lxc/proc/** rw,
deny /dev/.lxc/sys/** rw,
mount fstype=proc -> /var/cache/lxc/**,
mount fstype=sysfs -> /var/cache/lxc/**,
mount options=(rw,bind),
}
我对以下行有两个问题。
mount fstype=proc -> /var/cache/lxc/**,
为什么允许容器挂载 /proc 是安全的?
为什么容器需要在 /var/cache/lxc 下挂载 /proc ?