mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 14:50:24 +00:00
5809628523
Since CentOS Stream 8 is EOL, this commit updates the config to use vault.centos.org for CentOS Stream 8. This should be removed once the base image (ceph) is updated to a version with a newer CentOS. Signed-off-by: Praveen M <m.praveen@ibm.com>
46 lines
1.5 KiB
Docker
46 lines
1.5 KiB
Docker
ARG BASE_IMAGE
|
|
FROM ${BASE_IMAGE}
|
|
|
|
# Since CentOS Stream 8 is EOL, update the config to use vault.centos.org for CentOS Stream 8
|
|
# TODO: remove once https://github.com/ceph/ceph-csi/issues/4659 is fixed.
|
|
RUN sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/*.repo && \
|
|
sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/*.repo
|
|
|
|
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 dnf config-manager --disable \
|
|
tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true
|
|
|
|
RUN mkdir /etc/selinux || true && touch /etc/selinux/config
|
|
|
|
RUN dnf -y install \
|
|
git \
|
|
make \
|
|
gcc \
|
|
librados-devel \
|
|
libcephfs-devel \
|
|
librbd-devel \
|
|
&& dnf -y update \
|
|
&& dnf clean all \
|
|
&& rm -rf /var/cache/yum \
|
|
&& true
|
|
|
|
WORKDIR "/go/src/github.com/ceph/ceph-csi"
|