When I create an image based on rpi-bookworm-lite-arm64 which is ~450MB in xz format and ~2.6GB when uncompressed, the filesystem doesn't have enough room for provisioning commands I run (simple commands like apt install ...)
So I set the target image size to 3.5GB and all goes well, but then the created image is ~1.25GB when gzipped.
Currently I'm thinking maybe I can run apt clean to remove Debian package files and apt caches and then run zerofree on the filesystem and it should help gzip to compress the image much more. Is it ok or is there any official method for dealing with this issue in packer or packer-plugin-arm-image?
When I create an image based on rpi-bookworm-lite-arm64 which is ~450MB in xz format and ~2.6GB when uncompressed, the filesystem doesn't have enough room for provisioning commands I run (simple commands like
apt install ...)So I set the target image size to 3.5GB and all goes well, but then the created image is ~1.25GB when gzipped.
Currently I'm thinking maybe I can run
apt cleanto remove Debian package files and apt caches and then runzerofreeon the filesystem and it should help gzip to compress the image much more. Is it ok or is there any official method for dealing with this issue in packer or packer-plugin-arm-image?