Files
backup-bootc-image/Containerfile
T
2026-09-19 14:00:46 +02:00

30 lines
970 B
Docker

ARG CHUNKAH_CONFIG_STR
FROM quay.io/fedora/fedora-bootc:44 AS builder
# Install ZFS
# we want to keep ALL dnf downloaded packages in dnf cache,
# this is not the default, hackily add it to the config,
# assume there is not much in it. should be improved
RUN echo 'keepcache=True' >> /etc/dnf/dnf.conf
# deps
RUN --mount=type=cache,target=/var/cache/libdnf5 <<EOF
dnf install -y kernel-devel-$(uname -r | awk -F'-' '{print $1}')
dnf install -y https://zfsonlinux.org/fedora/zfs-release-3-1$(rpm --eval "%{dist}").noarch.rpm
dnf install -y zfs btop borgbackup
dnf clean all && rm -rf /run/dnf && rm -rf /tmp/*
EOF
RUN bootc container lint
FROM quay.io/coreos/chunkah AS chunkah
ARG CHUNKAH_CONFIG_STR
RUN --mount=type=bind,target=/run/src,rw \
--mount=from=builder,target=/chunkah,ro \
chunkah build --prune /sysroot/ --max-layers 128 \
--label ostree.commit- --label ostree.final-diffid- \
--output oci:/run/src/out
FROM oci:out