mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 13:30:23 +00:00
cbec296543
The CentOS 8 repository for Apache Arrow has been removed. This causes container-image builds fail with the following error: Errors during downloading metadata for repository 'apache-arrow-centos': - Status code: 404 for https://apache.jfrog.io/artifactory/arrow/centos/8/x86_64/repodata/repomd.xml (IP: 54.190.66.70) Error: Failed to download metadata for repo 'apache-arrow-centos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried The Ceph base image has `arrow/centos/8` configured, maybe Apache Arrow offers a CentOS Stream 8 repository now? Once the Ceph container-image has been updated, the repository can be enabled again. Ceph-CSI does not depend on Apache Arrow, so there is no functional change by disabling the repository. Signed-off-by: Niels de Vos <ndevos@redhat.com>
71 lines
1.9 KiB
Docker
71 lines
1.9 KiB
Docker
ARG SRC_DIR="/go/src/github.com/ceph/ceph-csi/"
|
|
ARG GO_ARCH
|
|
ARG BASE_IMAGE
|
|
|
|
FROM ${BASE_IMAGE} as builder
|
|
|
|
LABEL stage="build"
|
|
|
|
ARG CSI_IMAGE_NAME=quay.io/cephcsi/cephcsi
|
|
ARG CSI_IMAGE_VERSION=canary
|
|
ARG GO_ARCH
|
|
ARG SRC_DIR
|
|
ARG GIT_COMMIT
|
|
ARG GOROOT=/usr/local/go
|
|
|
|
COPY build.env /
|
|
|
|
RUN source /build.env && \
|
|
( test -n "${GO_ARCH}" && exit 0; echo -e "\n\nMissing GO_ARCH argument for building image, install Golang or run: make image-cephcsi GOARCH=amd64\n\n"; exit 1 ) && \
|
|
mkdir -p ${GOROOT} && \
|
|
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${GO_ARCH}.tar.gz | tar xzf - -C ${GOROOT} --strip-components=1
|
|
|
|
# test if the downloaded version of Golang works (different arch?)
|
|
RUN ${GOROOT}/bin/go version && ${GOROOT}/bin/go env
|
|
|
|
# FIXME: Ceph does not need Apache Arrow anymore, some container images may
|
|
# still have the repository enabled. Disabling the repository can be removed in
|
|
# the future, see https://github.com/ceph/ceph-container/pull/1990 .
|
|
RUN dnf config-manager --disable apache-arrow-centos || true
|
|
|
|
RUN dnf -y install \
|
|
librados-devel librbd-devel \
|
|
/usr/bin/cc \
|
|
make \
|
|
git \
|
|
&& true
|
|
|
|
ENV GOROOT=${GOROOT} \
|
|
GOPATH=/go \
|
|
CGO_ENABLED=1 \
|
|
GIT_COMMIT="${GIT_COMMIT}" \
|
|
ENV_CSI_IMAGE_VERSION="${CSI_IMAGE_VERSION}" \
|
|
ENV_CSI_IMAGE_NAME="${CSI_IMAGE_NAME}" \
|
|
PATH="${GOROOT}/bin:${GOPATH}/bin:${PATH}"
|
|
|
|
|
|
WORKDIR ${SRC_DIR}
|
|
|
|
# Copy source directories
|
|
COPY . ${SRC_DIR}
|
|
|
|
# Build executable
|
|
RUN make cephcsi
|
|
|
|
#-- Final container
|
|
FROM ${BASE_IMAGE}
|
|
|
|
ARG SRC_DIR
|
|
|
|
LABEL maintainers="Ceph-CSI Authors" \
|
|
version=${CSI_IMAGE_VERSION} \
|
|
architecture=${GO_ARCH} \
|
|
description="Ceph-CSI Plugin"
|
|
|
|
COPY --from=builder ${SRC_DIR}/_output/cephcsi /usr/local/bin/cephcsi
|
|
|
|
# verify that all dynamically linked libraries are available
|
|
RUN [ $(ldd /usr/local/bin/cephcsi | grep -c '=> not found') = '0' ]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/cephcsi"]
|