Get the latest tech news
Pi-CI – A RasPi 5 emulator in a Docker image for creating and flashing configs
Prepare Raspberry Pi 3, 4 & 5 configurations using a virtual machine. - ptrsr/pi-ci
A raspberry Pi emulator in a Docker image that lets developers easily prepare and flash RPi configurations. NOTE: although an SD card will say a specific size (such as 16GB), the device is usually if not always smaller (GB vs GiB). On the first boot of the real RPi, a program will automatically inflate the root partition to fill the rest of the target device.
Or read this on Hacker News