pre add the cache folder

This commit is contained in:
Kay0u 2023-05-17 13:03:46 +02:00
parent 71f07c134b
commit 6a6db406ef
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
3 changed files with 5 additions and 5 deletions

View file

@ -26,11 +26,6 @@ start_container () {
lxc restore $CONTAINER_IMAGE $SNAPSHOT_NAME
mkdir -p $current_dir/cache
chmod 777 $current_dir/cache
lxc config device add "$CONTAINER_IMAGE" cache-folder disk path=/cache source="$current_dir/cache"
lxc stop $CONTAINER_IMAGE || true
lxc start $CONTAINER_IMAGE
wait_container $CONTAINER_IMAGE

View file

@ -3,6 +3,9 @@
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $current_dir/utils.sh # Get utils functions.
mkdir -p $current_dir/cache
chmod 777 $current_dir/cache
for debian_version in "bullseye"
do
rebuild_base_containers $debian_version "stable" "amd64"

View file

@ -189,6 +189,8 @@ rebuild_base_containers()
lxc exec "$base_image_to_rebuild" -- /bin/bash -c "systemctl -q disable apt-daily.service"
lxc exec "$base_image_to_rebuild" -- /bin/bash -c "systemctl -q disable apt-daily-upgrade.service"
lxc config device add "$base_image_to_rebuild" cache-folder disk path=/cache source="$current_dir/cache"
create_snapshot "$base_image_to_rebuild" "before-install"
# Install YunoHost