REPO="gitea.wefers.page/julian/backup-server" TAG="latest" build() { read -srp "Desired password for user 'backup' in resulting container image: " password # ABSOLUTELY DO NOT USE --squash, as ostree NEEDS the layers sudo buildah build \ -t ${REPO}:${TAG} \ --build-arg PASSWORD="${password}" \ --pull \ --layers \ --format oci \ --network=host \ . if [ $? -eq 0 ]; then sudo buildah login gitea.wefers.page -u julian -p 278b81490079574229dce45b66b726d2ae7e83c0 sudo buildah push \ --compression-format zstd:chunked \ "${REPO}:${TAG}" fi } mkImage() { # set -euo # echo "current partitions:" # lsblk # read -p "target USB stick device to write image to: /dev/" dev sudo podman run \ --rm \ -it \ --privileged \ --pull=newer \ --network=host \ --security-opt label=type:unconfined_t \ -v ./config.toml:/config.toml:ro \ -v ./output:/output \ -v /etc/containers/storage.conf:/etc/containers/storage.conf \ -v /var/lib/containers/storage:/var/lib/containers/storage \ quay.io/centos-bootc/bootc-image-builder:latest \ --type anaconda-iso \ --use-librepo=true \ --rootfs ext4 \ ${REPO}:${TAG} # --in-vm \ # sudo dd if=output/bootiso/install.iso of=/dev/${dev} bs=4M } $1