25 lines
885 B
Docker
25 lines
885 B
Docker
FROM quay.io/fedora/fedora-bootc:44
|
|
|
|
# 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
|
|
EOF
|
|
|
|
RUN useradd -m -d /var/home/backup -G wheel backup
|
|
ARG PASSWORD
|
|
RUN echo "backup:${PASSWORD}" | chpasswd
|
|
RUN mkdir /backups && chown backup:backup /backups
|
|
|
|
COPY --chown=root:root --chmod=600 id_ed25519.pub /root/.ssh/authorized_keys
|
|
COPY --chown=backup:backup --chmod=600 id_ed25519.pub /var/home/backup/.ssh/authorized_keys
|
|
|
|
RUN bootc container lint
|