From 795ed073da33df98e45c14b83c39f32bbccf4867 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 29 Jul 2024 14:25:12 -0400 Subject: [PATCH] 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 --- testing/containers/ceph/Dockerfile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/testing/containers/ceph/Dockerfile b/testing/containers/ceph/Dockerfile index 5cbd04e..857b4cb 100644 --- a/testing/containers/ceph/Dockerfile +++ b/testing/containers/ceph/Dockerfile @@ -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}