Files
2026-06-02 17:40:22 +02:00

50 lines
1.3 KiB
Bash
Executable File

REPO="gitea.wefers.page/julian/backup-server"
TAG="latest"
build() {
# ABSOLUTELY DO NOT USE --squash, as ostree NEEDS the layers
sudo buildah build \
-t ${REPO}:${TAG} \
--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