Load container images descending by size (#2054)

* Load container images descending by size

Loading container images using docker load seems to require more space
at load time (which gets freed after loading). Loading the largest
container first avoids running out of space.
This commit is contained in:
Stefan Agner 2022-08-10 21:05:30 +02:00
parent 592806872f
commit cc5fe10e53
No known key found for this signature in database
GPG Key ID: AE01353D1E44747D

View File

@ -10,8 +10,12 @@ while ! docker version 2> /dev/null > /dev/null; do
done done
# Install Supervisor, plug-ins and landing page # Install Supervisor, plug-ins and landing page
echo "Loading containers..." echo "Loading container images..."
for image in /build/images/*.tar; do
# Make sure to order images by size (largest first)
# It seems docker load requires space during operation
# shellcheck disable=SC2045
for image in $(ls -S /build/images/*.tar); do
docker load --input "${image}" docker load --input "${image}"
done done