提交 643ede2b 编写于 作者: S Simon Fels

container: use cgroup snap-confine already setup

上级 120ba1c7
......@@ -266,6 +266,11 @@ void LxcContainer::start(const Configuration &configuration) {
set_config_item("lxc.init.cmd", "/anbox-init.sh");
// If we're running inside the snap environment snap-confine already created a
// cgroup for us we need to use as otherwise presevering a namespace wont help.
if (utils::is_env_set("SNAP"))
set_config_item("lxc.namespace.keep", "cgroup");
auto rootfs_path = SystemConfiguration::instance().rootfs_dir();
if (rootfs_overlay_)
rootfs_path = SystemConfiguration::instance().combined_rootfs_dir();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册