ceph-csi/scripts/Dockerfile.devel
Niels de Vos 21165dfc64 build: reinstall the ceph-release package
With the new Ceph container-build process, the .repo files for DNF are
removed. This means that the build containers can not install required
dependencies anymore, like librados-devel and librbd-devel.

By reinstalling the ceph-release package from the Ceph distribution
server, the .repo files are restored and the required Ceph packages can
be installed again.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2025-02-12 14:33:25 +00:00

46 lines
1.4 KiB
Docker

ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG GOROOT=/usr/local/go
ARG GOARCH
ENV GOPATH=/go \
GOROOT=${GOROOT} \
GO111MODULE=on \
PATH="${GOROOT}/bin:${GOPATH}/bin:${PATH}"
COPY build.env /
RUN source /build.env \
&& \
( test -n "${GOARCH}" && exit 0; echo -e "\n\nMissing GOARCH argument for building image, install Golang or run: make containerized-build GOARCH=amd64\n\n"; exit 1 ) \
&& mkdir -p /usr/local/go \
&& curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
# TODO: remove the following cmd, when issues
# https://github.com/ceph/ceph-container/issues/2034
# https://github.com/ceph/ceph-container/issues/2141 are fixed.
RUN true \
&& dnf -y reinstall https://download.ceph.com/rpm-${CEPH_VERSION}/el9/noarch/ceph-release-1-1.el9.noarch.rpm \
&& ( dnf config-manager --disable tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true ) \
&& true
RUN mkdir -p /etc/selinux && touch /etc/selinux/config
# other/conflicting versions of protobuf get installed as dependency
RUN dnf -y remove protobuf
RUN dnf -y install \
git \
make \
gcc \
librados-devel \
libcephfs-devel \
librbd-devel \
&& dnf -y --nobest update \
&& dnf clean all \
&& rm -rf /var/cache/yum \
&& true
WORKDIR "/go/src/github.com/ceph/ceph-csi"