I’ve started playing with bootable containers (bootc) for the purpose of maybe finally moving my home setup from manually installing everything to some form of infrastructure as code, at least for my VMs.
But I would like the images to be deployable non-interactively and having my user account preconfigured, including pulling my dotfiles from git. There doesn’t seem to be a good option for a human user account. My options are:
- just set up the user by banging a series of commands right in the Containerfile, which bootc documentation specifically advises not to do for a range of reasons,
- variety of ways to “inject” an account into the system on image build or deploy time that don’t offer any way to run further setup on that account, beyond maybe setting up SSH keys,
- “injecting” the account at build time and some sort of firstboot script that does the rest of the setup.
How would you set up a user for a bootc image?