mirror of https://github.com/ceph/go-ceph
containers: reorganize dockerfile command setting up repos and packages
Reorganize the RUN command in the Dockerfile that sets up distro based repositories and ceph packages. Move the `&&` to the beginning of the lines to highlight when commands begin (and end). Change the indent level of items that are arguments to commands to further clarify what is part of what. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
f60137a0ee
commit
795ed073da
|
@ -8,19 +8,23 @@ FROM ${CEPH_IMG}:${CEPH_TAG}
|
|||
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}" ] && \
|
||||
(. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then 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 --disablerepo=ganesha && \
|
||||
cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" && \
|
||||
yum install -y \
|
||||
git wget /usr/bin/curl make \
|
||||
/usr/bin/cc /usr/bin/c++ \
|
||||
"libcephfs-devel-${cv}" "librados-devel-${cv}" "librbd-devel-${cv}" \
|
||||
gdb libcephfs2-debuginfo librados2-debuginfo librbd1-debuginfo && \
|
||||
yum clean all && \
|
||||
true
|
||||
RUN true \
|
||||
&& echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \
|
||||
&& [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \
|
||||
&& (. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then 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 --disablerepo=ganesha \
|
||||
&& cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \
|
||||
&& yum install -y \
|
||||
git wget /usr/bin/curl make \
|
||||
/usr/bin/cc /usr/bin/c++ gdb \
|
||||
"libcephfs-devel-${cv}" \
|
||||
"librados-devel-${cv}" \
|
||||
"librbd-devel-${cv}" \
|
||||
libcephfs2-debuginfo \
|
||||
librados2-debuginfo \
|
||||
librbd1-debuginfo \
|
||||
&& yum clean all \
|
||||
&& true
|
||||
|
||||
ARG GO_VERSION=1.21.8
|
||||
ENV GO_VERSION=${GO_VERSION}
|
||||
|
|
Loading…
Reference in New Issue