mirror of
https://github.com/ceph/go-ceph
synced 2025-03-04 10:28:17 +00:00
Work around errors related to protobuf package locations on centos. This is triggered by our squid jobs failing with errors like: ``` 22.40 Problem: protobuf-3.14.0-13.el9.i686 from appstream does not belong to a distupgrade repository 22.40 - package protobuf-compiler-3.14.0-13.el9.x86_64 from @System requires protobuf = 3.14.0-13.el9, but none of the providers can be installed 22.40 - cannot install both protobuf-3.14.0-14.el9.x86_64 from appstream and protobuf-3.14.0-13.el9.x86_64 from @System 22.40 - cannot install both protobuf-3.14.0-14.el9.x86_64 from appstream and protobuf-3.14.0-13.el9.x86_64 from appstream 22.40 - cannot install the best update candidate for package protobuf-3.14.0-13.el9.x86_64 22.40 - problem with installed package protobuf-compiler-3.14.0-13.el9.x86_64 22.40 (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) ------ ``` Signed-off-by: John Mulligan <jmulligan@redhat.com>
57 lines
1.9 KiB
Docker
57 lines
1.9 KiB
Docker
ARG CEPH_IMG=quay.io/ceph/ceph
|
|
ARG CEPH_TAG=v16
|
|
FROM ${CEPH_IMG}:${CEPH_TAG}
|
|
|
|
# A CEPH_VERSION env var is already set in the base image.
|
|
# We save our build arg as GO_CEPH_VERSION and later ensure that
|
|
# the values agree to ensure we're building what we meant to build.
|
|
ARG GO_CEPH_VERSION
|
|
ENV GO_CEPH_VERSION=${GO_CEPH_VERSION:-$CEPH_VERSION}
|
|
|
|
RUN true \
|
|
&& echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \
|
|
&& [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \
|
|
&& enablerepos="--enablerepo=crb" \
|
|
&& . /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then enablerepos=""; find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi \
|
|
&& yum update -y $enablerepos \
|
|
&& cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \
|
|
&& yum install $enablerepos -y \
|
|
git wget /usr/bin/curl make \
|
|
/usr/bin/cc /usr/bin/c++ gdb \
|
|
"libcephfs-devel-${cv}" \
|
|
"librados-devel-${cv}" \
|
|
"librbd-devel-${cv}" \
|
|
"libradosstriper-devel-${cv}" \
|
|
libcephfs2-debuginfo \
|
|
librados2-debuginfo \
|
|
librbd1-debuginfo \
|
|
libradosstriper1-debuginfo \
|
|
&& yum clean all \
|
|
&& true
|
|
|
|
ARG GO_VERSION=1.21.8
|
|
ENV GO_VERSION=${GO_VERSION}
|
|
ARG GOARCH
|
|
ENV GOARCH=${GOARCH}
|
|
ARG GOPROXY
|
|
ENV GOPROXY=${GOPROXY}
|
|
RUN true && \
|
|
gotar=go${GO_VERSION}.linux-${GOARCH}.tar.gz && \
|
|
gourl="https://dl.google.com/go/${gotar}" && \
|
|
curl -o /tmp/${gotar} "${gourl}" && \
|
|
tar -x -C /opt/ -f /tmp/${gotar} && \
|
|
rm -f /tmp/${gotar} && \
|
|
true
|
|
|
|
ENV PATH="${PATH}:/opt/go/bin"
|
|
ENV GOROOT=/opt/go
|
|
ENV GO111MODULE=on
|
|
ENV GOPATH /go
|
|
ENV GOCACHE=/go/cache
|
|
WORKDIR /go/src/github.com/ceph/go-ceph
|
|
VOLUME /go/src/github.com/ceph/go-ceph
|
|
|
|
COPY micro-osd.sh /
|
|
COPY entrypoint.sh /
|
|
ENTRYPOINT ["/entrypoint.sh"]
|