This how-to uses mybox as container name, mkosi in order to create containers (it works for multiple distributions and has more features compared to dnf --installroot), and crudini for configurations file (you can use your preferred text editor instead).
# mkosi --cache /var/cache/mkosi -d fedora -t directory -o /var/lib/machines/mybox