From 277e986a9aebce5827f500e06ed61792dd2fd4cb Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Mar 2021 10:43:02 +0100 Subject: [PATCH] set nesting at launch --- prepare.sh | 3 +-- utils.sh | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/prepare.sh b/prepare.sh index 024a835..609d69c 100755 --- a/prepare.sh +++ b/prepare.sh @@ -23,8 +23,7 @@ start_container () { exit $SYSTEM_FAILURE_EXIT_CODE fi - lxc launch "$BASE_IMAGE-$SNAPSHOT_NAME" "$CONTAINER_ID" 2>/dev/null - lxc config set "$CONTAINER_ID" security.nesting true + lxc launch "$BASE_IMAGE-$SNAPSHOT_NAME" "$CONTAINER_ID" -c security.nesting=true 2>/dev/null mkdir -p $current_dir/cache chmod 777 $current_dir/cache diff --git a/utils.sh b/utils.sh index 481c75f..6b010d7 100755 --- a/utils.sh +++ b/utils.sh @@ -158,12 +158,10 @@ rebuild_base_containers() local arch=$3 local base_image_to_rebuild="yunohost-$debian_version-$ynh_version" - lxc launch images:debian/$debian_version/$arch "$base_image_to_rebuild-tmp" + lxc launch images:debian/$debian_version/$arch "$base_image_to_rebuild-tmp" -c security.nesting=true wait_container "$base_image_to_rebuild-tmp" - lxc config set "$base_image_to_rebuild-tmp" security.nesting true # Need this for buster because it is using apparmor - lxc exec "$base_image_to_rebuild-tmp" -- /bin/bash -c "apt-get update" lxc exec "$base_image_to_rebuild-tmp" -- /bin/bash -c "apt-get install --assume-yes wget curl" # Install Git LFS, git comes pre installed with ubuntu image. @@ -231,7 +229,7 @@ update_image() { fi # Start and run upgrade - lxc launch "$image_to_update" "$image_to_update-tmp" + lxc launch "$image_to_update" "$image_to_update-tmp" -c security.nesting=true wait_container "$image_to_update-tmp"