Skip to content

Commit f996870

Browse files
author
Shatadru Bandyopadhyay
committed
build: rebase cephcsi container image to Rocky Linux 10
The cephcsi image still built on CentOS Stream 9 packages while upstream Ceph has moved to Rocky Linux 10. This change moves the builder and final stage to Rocky Linux 10, install Tentacle client RPMs from the el10 ceph-release repo, and enable CRB repo. This drops the el9 ceph:v20 builder base and the stream9-minimal final image in favour of rockylinux:10 and rockylinux:10-minimal. Fixes #6411 Signed-off-by: Shatadru Bandyopadhyay <shatadru1@gmail.com>
1 parent 8cfc162 commit f996870

2 files changed

Lines changed: 12 additions & 18 deletions

File tree

build.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CSI_UPGRADE_VERSION=v3.16.2
2424
CEPH_CSI_OPERATOR_VERSION=latest
2525

2626
# Ceph version to use
27-
BASE_IMAGE=quay.io/ceph/ceph:v20
27+
BASE_IMAGE=docker.io/rockylinux/rockylinux:10
2828
CEPH_VERSION=tentacle
2929

3030
# standard Golang options

deploy/cephcsi/image/Dockerfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
ARG SRC_DIR="/go/src/github.com/ceph/ceph-csi/"
22
ARG GO_ARCH
33
ARG BASE_IMAGE
4-
ARG FINAL_BASE_IMAGE="quay.io/centos/centos:stream9-minimal"
4+
ARG FINAL_BASE_IMAGE="docker.io/rockylinux/rockylinux:10-minimal"
55

66
FROM ${BASE_IMAGE} as updated_base
77

8-
# TODO: remove the following cmd, when issues
9-
# https://github.com/ceph/ceph-container/issues/2034
10-
# https://github.com/ceph/ceph-container/issues/2141 are fixed.
11-
RUN true \
12-
&& dnf -y reinstall https://download.ceph.com/rpm-${CEPH_VERSION}/el9/noarch/ceph-release-1-1.el9.noarch.rpm \
13-
&& ( dnf config-manager --disable tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true ) \
14-
&& true
15-
16-
RUN mkdir -p /etc/selinux && touch /etc/selinux/config
8+
ARG CEPH_VERSION
179

18-
RUN dnf -y update --nobest \
19-
&& dnf -y install nfs-utils \
20-
&& dnf clean all \
21-
&& rm -rf /var/cache/yum
10+
RUN rpm -ivh https://download.ceph.com/rpm-${CEPH_VERSION}/el10/noarch/ceph-release-1-0.el10.noarch.rpm \
11+
&& dnf -y install epel-release \
12+
&& dnf -y update --nobest \
13+
&& dnf -y install --enablerepo=crb --setopt=install_weak_deps=False nfs-utils \
14+
&& dnf clean all \
15+
&& rm -rf /var/cache/dnf /var/cache/yum
2216

2317
FROM updated_base as builder
2418

@@ -45,7 +39,7 @@ RUN ${GOROOT}/bin/go version && ${GOROOT}/bin/go env
4539
# other/conflicting versions of protobuf get installed as dependency
4640
RUN dnf -y remove protobuf
4741

48-
RUN dnf -y install --nodocs \
42+
RUN dnf -y install --enablerepo=crb --nodocs \
4943
librados-devel librbd-devel libcephfs-devel \
5044
/usr/bin/cc \
5145
make \
@@ -85,9 +79,9 @@ LABEL maintainers="Ceph-CSI Authors" \
8579
COPY --from=builder ${SRC_DIR}/_output/cephcsi /usr/local/bin/cephcsi
8680

8781
RUN true \
88-
&& rpm -ivh https://download.ceph.com/rpm-${CEPH_VERSION}/el9/noarch/ceph-release-1-1.el9.noarch.rpm \
82+
&& rpm -ivh https://download.ceph.com/rpm-${CEPH_VERSION}/el10/noarch/ceph-release-1-0.el10.noarch.rpm \
8983
&& microdnf -y install kmod nfs-utils nvme-cli epel-release psmisc e2fsprogs xfsprogs cryptsetup attr --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
90-
&& microdnf -y install thrift librados2 librbd1 libcephfs2 ceph-common ceph-fuse rbd-nbd --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
84+
&& microdnf -y install --enablerepo=crb thrift librados2 librbd1 libcephfs2 ceph-common ceph-fuse rbd-nbd --setopt=install_weak_deps=0 --setopt=tsflags=nodocs \
9185
&& microdnf clean all \
9286
&& true
9387

0 commit comments

Comments
 (0)