Viewing: Dockerfile-rocky96
# first, build docker image with:
# $ podman build -t rocky93-build -v <path-to-kernel>:/tmp/linux-kernel \
# -f Dockerfile-rocky93
# this builds a image with ZFS cloned from original repo
#
# then use it to build Lustre:
# $ podman run -it
# --mount type=bind,source=<path-to-kernel>,target=/tmp/kernel \
# --mount type=bind,source=<path-to-lustre>,target=/tmp/lustre \
# rocky93-build /bin/bash -c "cd /tmp/lustre; sh autogen.sh; \
# ./configure --with-linux=<path-to-kernel> \
# --with-linux-obj=<path-to-kernel> --disable-gss \
# --disable-shared --disable-crypto; make"
#
# TODO:
# - configurable zfs repo, zfs version/tag
# - move kernel to image
#
FROM docker.io/rockylinux/rockylinux:9.6.20250531
RUN dnf install -y dnf-plugins-core
RUN dnf config-manager --enable crb
RUN dnf install -y gcc autoconf libtool which make patch diffutils file \
binutils-devel python3 python3-devel elfutils-devel \
libselinux-devel libaio-devel dnf-plugins-core bc bison flex
RUN dnf install -y libyaml-devel libnl3-devel libmount-devel
# to build lipe (no redhat-lsb, guile, guile-devel)
RUN dnf install -y json-c-devel libssh-devel libattr-devel
# to build ZFS
RUN dnf install -y libtirpc-devel libblkid-devel openssl-devel libuuid-devel
RUN dnf install -y git
#build and install latest e2fsprogs
ARG E2FSPROGS_GIT=git://review.whamcloud.com/tools/e2fsprogs.git
ENV _E2GIT=${E2FSPROGS_GIT}
RUN /bin/bash -c \
"git clone $_E2GIT e2fsprogs && \
cd e2fsprogs && \
git checkout -b v1.47.3-wc2 v1.47.3-wc2 && \
./configure --with-root-prefix=/usr --enable-elf-shlibs \
--libdir=/usr/lib64 \
--disable-uuidd --disable-fsck \
--disable-e2initrd-helper \
--disable-libblkid --disable-libuuid \
--enable-quota --disable-fuse2fs && \
make -j8 && make install && cd .. && rm -rf e2fsprogs"
# to build zfs we need the kernel built
RUN /bin/bash -c \
"cd /tmp/linux-kernel; make -j4 oldconfig bzImage && make -j modules"
# build and install ZFS
ARG ZFS_GIT=https://github.com/zfsonlinux/zfs
ENV _ZFS_GIT=${ZFS_GIT}
RUN /bin/bash -c \
"rm -rf zfs && \
git clone ${_ZFS_GIT} zfs && \
cd zfs && \
git checkout -b zfs-2.3.2 zfs-2.3.2 && \
sed -i 's/CDDL/GPL/' META && \
sed -i 's/struct request_queue r/static struct request_queue r/' config/kernel-blk-queue.m4 && \
./autogen.sh && \
./configure \
--with-linux=/tmp/linux-kernel \
--with-linux-obj=/tmp/linux-kernel --prefix=/usr && \
make -j8 && \
make install && \
cd .. && rm -rf zfs"
RUN dnf remove -y git
RUN dnf clean all