Updated to build ZFS from source
This commit is contained in:
+77
-57
@@ -10,70 +10,90 @@ WORKDIR /gocryptfs
|
|||||||
RUN ./build-without-openssl.bash
|
RUN ./build-without-openssl.bash
|
||||||
|
|
||||||
# ====== Stage 2: Server image ======
|
# ====== Stage 2: Server image ======
|
||||||
FROM quay.io/fedora/fedora-silverblue:39
|
FROM quay.io/fedora/fedora-silverblue:40
|
||||||
|
|
||||||
COPY --from=builder /gocryptfs/gocryptfs /usr/bin/gocryptfs
|
COPY --from=builder /gocryptfs/gocryptfs /usr/bin/gocryptfs
|
||||||
|
|
||||||
# Install ZFS repository
|
|
||||||
RUN rpm-ostree install https://github.com/zfsonlinux/zfsonlinux.github.com/raw/master/fedora/zfs-release-2-4$(rpm --eval "%{dist}").noarch.rpm && \
|
|
||||||
# cleanup and verification stage
|
|
||||||
rm -vrf /var /*.rpm && \
|
|
||||||
ostree container commit
|
|
||||||
|
|
||||||
# Install ZFS build deps
|
|
||||||
RUN rpm-ostree install \
|
|
||||||
kernel-devel kernel-devel-matched kernel-headers kernel-srpm-macros && \
|
|
||||||
# cleanup and verification stage
|
|
||||||
rm -vrf /var && \
|
|
||||||
ostree container commit
|
|
||||||
|
|
||||||
# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201
|
|
||||||
RUN test -f /usr/bin/ld || ln -s /usr/bin/ld.bfd /usr/bin/ld
|
|
||||||
|
|
||||||
# Install zfs
|
|
||||||
RUN rpm-ostree install zfs && \
|
|
||||||
dkms autoinstall -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \
|
|
||||||
# cleanup and verification stage
|
|
||||||
rm -vrf /var && \
|
|
||||||
ostree container commit
|
|
||||||
|
|
||||||
# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201
|
|
||||||
RUN test -h /usr/bin/ld && rm -v /usr/bin/ld
|
|
||||||
|
|
||||||
# Install zrepl repository
|
# Install zrepl repository
|
||||||
COPY zrepl.asc /var/roothome/zrepl.asc
|
COPY zrepl.asc /var/roothome/zrepl.asc
|
||||||
RUN rpm --import /var/roothome/zrepl.asc
|
RUN rpm --import /var/roothome/zrepl.asc
|
||||||
COPY zrepl.repo /etc/yum.repos.d/zrepl.repo
|
COPY zrepl.repo /etc/yum.repos.d/zrepl.repo
|
||||||
|
|
||||||
RUN rpm-ostree install \
|
RUN rpm-ostree install \
|
||||||
ansible \
|
`# ===== SECTION 1: ZFS BUILD DEPENDENCIES =====` \
|
||||||
borgbackup \
|
autoconf \
|
||||||
certbot \
|
automake \
|
||||||
distrobox \
|
dkms \
|
||||||
fuse-encfs \
|
elfutils-libelf-devel \
|
||||||
fuse-sshfs \
|
gcc \
|
||||||
hddtemp \
|
git \
|
||||||
htop \
|
kernel-devel \
|
||||||
iftop \
|
libaio-devel \
|
||||||
iotop \
|
libattr-devel \
|
||||||
ipmitool \
|
libblkid-devel \
|
||||||
libvirt \
|
libcurl-devel \
|
||||||
lm_sensors \
|
libffi-devel \
|
||||||
net-tools \
|
libtirpc-devel \
|
||||||
netcat \
|
libtool \
|
||||||
nginx \
|
libudev-devel \
|
||||||
nut \
|
libuuid-devel \
|
||||||
pv \
|
make \
|
||||||
python3-certbot-nginx \
|
ncompress \
|
||||||
qemu-kvm \
|
openssl-devel \
|
||||||
rclone \
|
python-packaging \
|
||||||
screen \
|
python3 \
|
||||||
smartmontools \
|
python3-cffi \
|
||||||
strace \
|
python3-devel \
|
||||||
stress-ng \
|
python3-setuptools \
|
||||||
telnet \
|
rpm-build \
|
||||||
vim \
|
zlib-devel \
|
||||||
zrepl-v0.6.0-1.x86_64 \
|
`# ===== SECTION 2: UTILITIES =====` \
|
||||||
&& ln -s /usr/bin/netcat /usr/bin/nc \
|
ansible \
|
||||||
&& rm -vrf /var && ostree container commit
|
borgbackup \
|
||||||
|
certbot \
|
||||||
|
distrobox \
|
||||||
|
fuse-encfs \
|
||||||
|
fuse-sshfs \
|
||||||
|
hddtemp \
|
||||||
|
htop \
|
||||||
|
iftop \
|
||||||
|
iotop \
|
||||||
|
ipmitool \
|
||||||
|
libvirt \
|
||||||
|
lm_sensors \
|
||||||
|
net-tools \
|
||||||
|
netcat \
|
||||||
|
nginx \
|
||||||
|
nut \
|
||||||
|
pv \
|
||||||
|
python3-certbot-nginx \
|
||||||
|
qemu-kvm \
|
||||||
|
rclone \
|
||||||
|
screen \
|
||||||
|
smartmontools \
|
||||||
|
strace \
|
||||||
|
stress-ng \
|
||||||
|
telnet \
|
||||||
|
vim \
|
||||||
|
zrepl-v0.6.0-1.x86_64 \
|
||||||
|
&& ln -s /usr/bin/netcat /usr/bin/nc \
|
||||||
|
&& rm -vrf /var && ostree container commit
|
||||||
|
|
||||||
|
# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201
|
||||||
|
RUN test -f /usr/bin/ld || ln -s /usr/bin/ld.bfd /usr/bin/ld
|
||||||
|
|
||||||
|
RUN git clone https://github.com/openzfs/zfs \
|
||||||
|
&& cd /zfs \
|
||||||
|
&& sh autogen.sh \
|
||||||
|
&& ./configure --prefix=/var/usrlocal \
|
||||||
|
&& make -s -j$(nproc) \
|
||||||
|
&& make install \
|
||||||
|
&& ldconfig \
|
||||||
|
&& depmod $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') \
|
||||||
|
&& dkms autoinstall -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') \
|
||||||
|
&& rm -vrf /var \
|
||||||
|
&& ostree container commit
|
||||||
|
|
||||||
|
# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201
|
||||||
|
RUN test -h /usr/bin/ld && rm -v /usr/bin/ld
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user