Containerfile: cache dnf folder

This commit is contained in:
Julian Wefers
2026-05-31 14:28:56 +02:00
parent 5ef4950ce2
commit cf0700348b
+11 -3
View File
@@ -1,9 +1,17 @@
FROM quay.io/fedora/fedora-bootc:44 FROM quay.io/fedora/fedora-bootc:44
# Install ZFS # Install ZFS
RUN dnf install -y kernel-devel-$(uname -r | awk -F'-' '{print $1}') # we want to keep ALL dnf downloaded packages in dnf cache,
RUN dnf install -y https://zfsonlinux.org/fedora/zfs-release-3-1$(rpm --eval "%{dist}").noarch.rpm # this is not the default, hackily add it to the config,
RUN dnf install -y zfs # 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
EOF
RUN useradd -m -d /var/home/backup -G wheel backup RUN useradd -m -d /var/home/backup -G wheel backup
ARG PASSWORD ARG PASSWORD