I am building a minimal Debian image with debootstrap, chroot in it and installing grub.
Now I need to install some custom self created debian packages. These packages have postinst scripts running database migrations. BUT in my chroot env the postgresql of course is not running.
systemd-nspawn but without the
-b flag the container is not booted and again the postgresql is not running.
apt install ... fails and running
apt install during the first real boot would probably rerun the postinst successfully but it feels ugly.
Is there a better way how to prepare a minimal clean bootable already configured image?