diff --git a/tools/bin/capture-docker-stack b/tools/bin/capture-docker-stack index 540fca3c..cdd5983c 100755 --- a/tools/bin/capture-docker-stack +++ b/tools/bin/capture-docker-stack @@ -32,6 +32,7 @@ make-filesystem-image "${IMG}" "${DOCKER_IMAGE_SIZE_IN_MB}" |& indent display "Mounting image ${IMG_MNT}" mount-filesystem-image "${IMG}" "${IMG_MNT}" |& indent +df --human-readable "${IMG_MNT}" |& indent display "Copying stack to image" export-docker-image "${DOCKER_IMAGE}" "${IMG_MNT}" |& indent diff --git a/tools/bin/make-filesystem-image b/tools/bin/make-filesystem-image index e093daa3..1c420087 100755 --- a/tools/bin/make-filesystem-image +++ b/tools/bin/make-filesystem-image @@ -13,6 +13,8 @@ DOCKER_IMAGE_SIZE_IN_MB="$2" # as to ensure a few MB additional free space headroom. IMG_SIZE_IN_MB=$((DOCKER_IMAGE_SIZE_IN_MB * 107 / 100)) +echo "Using file size of ${IMG_SIZE_IN_MB} MB based on Docker image size of ${DOCKER_IMAGE_SIZE_IN_MB} MB" + mkdir -p "$(dirname "$IMG")" # Create an empty file of the specified size. @@ -25,7 +27,7 @@ fallocate --length "${IMG_SIZE_IN_MB}MiB" "${IMG}" # The `-m` argument reduces reserved-blocks-percentage from its default of 5% to 1%. # TODO: Switch to calling `mkfs.ext3` or `mke2fs -t ext3` since the `mkfs` alias is deprecated: # https://manpages.ubuntu.com/manpages/jammy/en/man8/mkfs.8.html -mkfs -t ext3 -m 1 "$IMG" +mkfs -t ext3 -T default -m 1 -v "$IMG" # Adjust the filesystem parameters for improved performance on runtime instances. # The `-c` and `-i` arguments disable automatic filesystem checks, which are otherwise run based