Skip to content

Commit

Permalink
Change silverblue-zfs-base to use fedora-coreos kernel for abi stabil…
Browse files Browse the repository at this point in the history
…ity for ZFS.
  • Loading branch information
Thomas Wiest committed Jul 27, 2024
1 parent 8b779c3 commit 470cb5a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions silverblue-zfs-base/Containerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
FROM ghcr.io/cgwalters/fedora-silverblue:38
FROM ghcr.io/twiest/silverblue-downloader-kernel-cache:latest as rpms

# Install ZFS repository
RUN rpm-ostree install https://zfsonlinux.org/fedora/zfs-release-2-4$(rpm --eval "%{dist}").noarch.rpm && \

FROM quay.io/fedora/fedora-silverblue:40

# Remove current kernel
RUN rpm -evh --nodeps kernel-modules-core kernel-core kernel-modules kernel kernel-modules-extra

# Add coreos kernel
COPY --from=rpms /rpms /rpms
RUN rpm-ostree install /rpms/kernel* && \
# cleanup and verification stage
rm -vrf /var /*.rpm && \
rm -vrf /var /rpms && \
ostree container commit

# Install dkms deps
RUN rpm-ostree install \
kernel-devel kernel-devel-matched kernel-headers kernel-srpm-macros && \
# Install ZFS repository
RUN rpm-ostree install https://zfsonlinux.org/fedora/zfs-release-2-5$(rpm --eval "%{dist}").noarch.rpm && \
# cleanup and verification stage
rm -vrf /var && \
ostree container commit
Expand Down Expand Up @@ -56,7 +62,7 @@ RUN echo 'add_dracutmodules+=" zfs "' > /etc/dracut.conf.d/zfs.conf && \
# Run dracut to build a new initrd
RUN export KERNEL_VERSION="$(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" && \
stock_arguments=$(lsinitrd "/lib/modules/${KERNEL_VERSION}/initramfs.img" | grep '^Arguments: ' | sed 's/^Arguments: //') && \
mkdir -p /tmp/dracut /var/roothome && \
mkdir -p /var/tmp /tmp/dracut /var/roothome && \
bash <(/usr/bin/echo "dracut $stock_arguments") && \
rm -rf /var/* /tmp/* && \
ostree container commit
Expand Down

0 comments on commit 470cb5a

Please sign in to comment.