2021-08-24 14:45:24 +00:00
|
|
|
ARG CEPH_IMG=quay.io/ceph/ceph
|
|
|
|
ARG CEPH_TAG=v16
|
|
|
|
FROM ${CEPH_IMG}:${CEPH_TAG}
|
2020-03-11 18:53:40 +00:00
|
|
|
|
2021-08-24 14:45:24 +00:00
|
|
|
# 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
|
2022-06-27 15:56:58 +00:00
|
|
|
ENV GO_CEPH_VERSION=${GO_CEPH_VERSION:-$CEPH_VERSION}
|
2020-03-11 18:53:40 +00:00
|
|
|
|
|
|
|
RUN true && \
|
2021-08-24 14:45:24 +00:00
|
|
|
echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" && \
|
|
|
|
[ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] && \
|
2021-05-31 14:15:58 +00:00
|
|
|
yum update -y && \
|
2020-07-16 18:05:06 +00:00
|
|
|
cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" && \
|
|
|
|
yum install -y \
|
|
|
|
git wget curl make \
|
|
|
|
/usr/bin/cc /usr/bin/c++ \
|
|
|
|
"libcephfs-devel-${cv}" "librados-devel-${cv}" "librbd-devel-${cv}" && \
|
2021-05-31 14:15:58 +00:00
|
|
|
yum clean all && \
|
2020-03-11 18:53:40 +00:00
|
|
|
true
|
|
|
|
|
2022-05-02 18:28:48 +00:00
|
|
|
ARG GO_VERSION=1.17.9
|
2021-08-26 15:06:49 +00:00
|
|
|
ENV GO_VERSION=${GO_VERSION}
|
2020-03-11 18:53:40 +00:00
|
|
|
RUN true && \
|
2021-08-26 15:06:49 +00:00
|
|
|
gotar=go${GO_VERSION}.linux-amd64.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} && \
|
2020-03-11 18:53:40 +00:00
|
|
|
true
|
|
|
|
|
|
|
|
ENV PATH="${PATH}:/opt/go/bin"
|
|
|
|
ENV GOROOT=/opt/go
|
|
|
|
ENV GO111MODULE=on
|
|
|
|
ENV GOPATH /go
|
2020-12-12 02:58:24 +00:00
|
|
|
ENV GODEBUG=cgocheck=2
|
2021-06-08 15:35:35 +00:00
|
|
|
ENV GOCACHE=/go/cache
|
2020-03-11 18:53:40 +00:00
|
|
|
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"]
|