Grow cloud image root by 4 GB before customizing (Docker install filled the disk)

This commit is contained in:
steffen committed 2026-11-04 21:05:28 +01:00
1 parent 5a564aaa47
commit 665eadc8d6
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -267,10 +267,14 @@ print_summary() {
build_template() {
local id=$1 name=$2 cores=$3 ram=$4 disk=$5 docker=$6
local image="$WORKDIR/build-$id.img"
local -a customize=(--install qemu-guest-agent)
# The cloud image's root filesystem is only ~2 GB, too small for Docker.
# Grow the image by 4 GB and the root partition with it before installing.
local -a customize=(--run-command 'growpart /dev/sda 1 && resize2fs /dev/sda1'
--install qemu-guest-agent)
info "[$id] Preparing image for $name"
cp "$BASE_IMAGE" "$image"
qemu-img resize -q "$image" +4G
if [[ $docker == y ]]; then
customize+=(--run-command 'curl -fsSL https://get.docker.com | sh')