container: use cgroup snap-confine already setup
This commit is contained in:
parent
120ba1c701
commit
643ede2b90
1 changed files with 5 additions and 0 deletions
|
|
@ -266,6 +266,11 @@ void LxcContainer::start(const Configuration &configuration) {
|
||||||
|
|
||||||
set_config_item("lxc.init.cmd", "/anbox-init.sh");
|
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();
|
auto rootfs_path = SystemConfiguration::instance().rootfs_dir();
|
||||||
if (rootfs_overlay_)
|
if (rootfs_overlay_)
|
||||||
rootfs_path = SystemConfiguration::instance().combined_rootfs_dir();
|
rootfs_path = SystemConfiguration::instance().combined_rootfs_dir();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue