From 35fafe4c98ce231cbac5d7741ca9a7e6a2f5d71f Mon Sep 17 00:00:00 2001 From: Thomas Birkett Date: Fri, 3 Jan 2025 11:31:32 +0000 Subject: [PATCH 1/5] Optimise multiple RUN statements for clarity of steps in build process. We're also clearing up the cache per layer of build to reduce image size while maintaining RUN statements --- docker-c8/Dockerfile | 64 +++++++++++++++--------- docker-c9/Dockerfile | 64 +++++++++++++++--------- xrootd/Dockerfile | 113 ++++++++++++++++++++++++------------------- 3 files changed, 144 insertions(+), 97 deletions(-) diff --git a/docker-c8/Dockerfile b/docker-c8/Dockerfile index ede7c70..e75ac84 100644 --- a/docker-c8/Dockerfile +++ b/docker-c8/Dockerfile @@ -1,5 +1,10 @@ FROM rockylinux:8 +# Add labels +LABEL source=https://github.com/stfc/grid-workernode +LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ +It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." + # Basic dependencies RUN dnf -y install \ zip \ @@ -15,44 +20,55 @@ RUN dnf -y install \ attr \ tcsh \ numactl \ - bc - -# Create all possible pool accounts -RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - + bc && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # CVMFS (for SUM tests only; install before adding other repos to ensure we have the latest version) RUN dnf -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm \ - https://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/AlmaLinux_8/noarch/cvmfs-config-egi-2.7-1.8.obs.el8.noarch.rpm -RUN dnf -y install cvmfs + https://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/AlmaLinux_8/noarch/cvmfs-config-egi-2.7-1.8.obs.el8.noarch.rpm && \ + # Install CVMFS + dnf -y install cvmfs && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# EPEL +# Install EPEL repository RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm # Install HEP_OSlibs -RUN dnf -y install https://linuxsoft.cern.ch/wlcg/centos8/x86_64/wlcg-repo-1.0.0-1.el8.noarch.rpm -RUN dnf -y install --enablerepo=devel HEP_OSlibs +RUN dnf -y install https://linuxsoft.cern.ch/wlcg/centos8/x86_64/wlcg-repo-1.0.0-1.el8.noarch.rpm && \ + dnf -y install --enablerepo=devel HEP_OSlibs && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # Boost (need to ensure gfal CLI from CVMFS will work for some VOs) RUN dnf -y install boost-date-time boost-filesystem boost-graph boost-iostreams boost-program-options \ boost-regex boost-serialization boost-signals boost-system boost-test \ - boost-thread boost-wave - -# Apptainer -RUN dnf -y install apptainer - -# Disable overlay and loop device management in Apptainer -RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ - sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ - sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf + boost-thread boost-wave && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# Deny setuid in Apptainer -RUN sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf +# Install Apptainer +RUN dnf -y install apptainer && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# Update & cleanup +# Update OS packages & tidy up RUN dnf -y update && \ dnf clean all && \ rm -rf /var/cache/dnf -LABEL source=https://github.com/stfc/grid-workernode -LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ -It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." +# Create all possible pool accounts +RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - + +# Disable overlay and loop device management in Apptainer +RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ + sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ + sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf && \ + # Deny setuid in Apptainer + sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf diff --git a/docker-c9/Dockerfile b/docker-c9/Dockerfile index e4195e0..4cca34a 100644 --- a/docker-c9/Dockerfile +++ b/docker-c9/Dockerfile @@ -1,5 +1,10 @@ FROM rockylinux:9 +# Add labels +LABEL source=https://github.com/stfc/grid-workernode +LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ +It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." + # Basic dependencies RUN dnf -y install \ zip \ @@ -15,44 +20,55 @@ RUN dnf -y install \ attr \ tcsh \ numactl \ - bc - -# Create all possible pool accounts -RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - + bc && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # CVMFS (for SUM tests only; install before adding other repos to ensure we have the latest version) RUN dnf -y install https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm \ - https://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/AlmaLinux_9/noarch/cvmfs-config-egi-2.7-1.8.obs.el9.noarch.rpm -RUN dnf -y install cvmfs + https://download.opensuse.org/repositories/home:/cvmfs:/contrib-egi/AlmaLinux_9/noarch/cvmfs-config-egi-2.7-1.8.obs.el9.noarch.rpm && \ + # Install CVMFS + dnf -y install cvmfs && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# EPEL +# Install EPEL repository RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm # Install HEP_OSlibs -RUN dnf -y install https://linuxsoft.cern.ch/wlcg/el9/x86_64/wlcg-repo-1.0.0-1.el9.noarch.rpm -RUN dnf -y install --enablerepo=devel HEP_OSlibs +RUN dnf -y install https://linuxsoft.cern.ch/wlcg/el9/x86_64/wlcg-repo-1.0.0-1.el9.noarch.rpm && \ + dnf -y install --enablerepo=devel HEP_OSlibs && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # Boost (need to ensure gfal CLI from CVMFS will work for some VOs) RUN dnf -y install boost-date-time boost-filesystem boost-graph boost-iostreams boost-program-options \ boost-regex boost-serialization boost-system boost-test \ - boost-thread boost-wave - -# Apptainer -RUN dnf -y install apptainer - -# Disable overlay and loop device management in Apptainer -RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ - sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ - sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf + boost-thread boost-wave && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# Deny setuid in Apptainer -RUN sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf +# Install Apptainer +RUN dnf -y install apptainer && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# Update & cleanup +# Update OS packages & tidy up RUN dnf -y update && \ dnf clean all && \ rm -rf /var/cache/dnf -LABEL source=https://github.com/stfc/grid-workernode -LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ -It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." +# Create all possible pool accounts +RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - + +# Disable overlay and loop device management in Apptainer +RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ + sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ + sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf && \ + # Deny setuid in Apptainer + sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf diff --git a/xrootd/Dockerfile b/xrootd/Dockerfile index f5f5874..61fd0e5 100644 --- a/xrootd/Dockerfile +++ b/xrootd/Dockerfile @@ -1,4 +1,6 @@ FROM rockylinux:8 + +# Add labels and arguments ARG XROOTD_VERSION=5.7.3-3 ARG XRDCEPH_VERSION=5.7.3-3 ARG CEPH_VERSION=14.2.22-0 @@ -13,50 +15,52 @@ RUN groupadd --gid 65432 xrootd && \ # Repositories COPY *.repo /etc/yum.repos.d/ -# install versionlock, and configure versionlocks -RUN dnf -y install python3-dnf-plugin-versionlock -RUN dnf -y versionlock add ceph-${CEPH_VERSION}.el8.x86_64 \ - ceph-base-${CEPH_VERSION}.el8.x86_64 \ - ceph-common-${CEPH_VERSION}.el8.x86_64 \ - ceph-mds-${CEPH_VERSION}.el8.x86_64 \ - ceph-mgr-${CEPH_VERSION}.el8.x86_64 \ - ceph-mon-${CEPH_VERSION}.el8.x86_64 \ - ceph-osd-${CEPH_VERSION}.el8.x86_64 \ - ceph-selinux-${CEPH_VERSION}.el8.x86_64 \ - libcephfs2-${CEPH_VERSION}.el8.x86_64 \ - librados2-${CEPH_VERSION}.el8.x86_64 \ - libradosstriper1-${CEPH_VERSION}.el8.x86_64 \ - librbd1-${CEPH_VERSION}.el8.x86_64 \ - librgw2-${CEPH_VERSION}.el8.x86_64 \ - python-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ - python-cephfs-${CEPH_VERSION}.el8.x86_64 \ - python-rados-${CEPH_VERSION}.el8.x86_64 \ - python-rbd-${CEPH_VERSION}.el8.x86_64 \ - python-rgw-${CEPH_VERSION}.el8.x86_64 \ - python3-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ - python3-cephfs-${CEPH_VERSION}.el8.x86_64 \ - python3-rados-${CEPH_VERSION}.el8.x86_64 \ - python3-rbd-${CEPH_VERSION}.el8.x86_64 \ - python3-rgw-${CEPH_VERSION}.el8.x86_64 \ - xrootd-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-client-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-client-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-selinux-${XROOTD_VERSION}.el8.noarch \ - xrootd-server-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-server-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-ceph-buffered-${XRDCEPH_VERSION}.el8.x86_64 \ - xrootd-voms-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-scitokens-${XROOTD_VERSION}.el8.x86_64 - -RUN dnf -y versionlock list - +# Install versionlock, and configure versionlocks +RUN dnf -y install python3-dnf-plugin-versionlock && \ + dnf -y versionlock add ceph-${CEPH_VERSION}.el8.x86_64 \ + ceph-base-${CEPH_VERSION}.el8.x86_64 \ + ceph-common-${CEPH_VERSION}.el8.x86_64 \ + ceph-mds-${CEPH_VERSION}.el8.x86_64 \ + ceph-mgr-${CEPH_VERSION}.el8.x86_64 \ + ceph-mon-${CEPH_VERSION}.el8.x86_64 \ + ceph-osd-${CEPH_VERSION}.el8.x86_64 \ + ceph-selinux-${CEPH_VERSION}.el8.x86_64 \ + libcephfs2-${CEPH_VERSION}.el8.x86_64 \ + librados2-${CEPH_VERSION}.el8.x86_64 \ + libradosstriper1-${CEPH_VERSION}.el8.x86_64 \ + librbd1-${CEPH_VERSION}.el8.x86_64 \ + librgw2-${CEPH_VERSION}.el8.x86_64 \ + python-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ + python-cephfs-${CEPH_VERSION}.el8.x86_64 \ + python-rados-${CEPH_VERSION}.el8.x86_64 \ + python-rbd-${CEPH_VERSION}.el8.x86_64 \ + python-rgw-${CEPH_VERSION}.el8.x86_64 \ + python3-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ + python3-cephfs-${CEPH_VERSION}.el8.x86_64 \ + python3-rados-${CEPH_VERSION}.el8.x86_64 \ + python3-rbd-${CEPH_VERSION}.el8.x86_64 \ + python3-rgw-${CEPH_VERSION}.el8.x86_64 \ + xrootd-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-client-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-client-libs-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-libs-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-selinux-${XROOTD_VERSION}.el8.noarch \ + xrootd-server-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-server-libs-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-ceph-buffered-${XRDCEPH_VERSION}.el8.x86_64 \ + xrootd-voms-${XROOTD_VERSION}.el8.x86_64 \ + xrootd-scitokens-${XROOTD_VERSION}.el8.x86_64 && \ + # For debugging purposes, show the versionlock list + dnf -y versionlock list -# Ceph +# Install CEPH RUN dnf -y install ceph \ - ceph-common + ceph-common && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# xrootd +# Install XROOTD RUN dnf -y install xrootd-ceph-buffered \ xrootd-client \ xrootd-client-libs \ @@ -65,23 +69,34 @@ RUN dnf -y install xrootd-ceph-buffered \ xrootd-server-libs \ xrootd-voms \ xrootd-scitokens \ - jemalloc - + jemalloc && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # For N2N mapping RUN dnf -y install http://repos.gridpp.rl.ac.uk/yum/xrootd-cmstfc/el8/xrootd-cmstfc-1.5.2-6.osgroup.el8.x86_64.rpm -# Needed by the health-check scripts -RUN dnf -y install openssl +# Required for health-check scripts +RUN dnf -y install openssl && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# python3 needed for cephsum script +# Python3 required for cephsum script RUN dnf -y install python3 \ - python3-rados + python3-rados && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf # Install netcat for service healthcheck -RUN dnf -y install netcat +RUN dnf -y install netcat && \ + # Clean up cache to keep layer size small + dnf clean all && \ + rm -rf /var/cache/dnf -# Update & cleanup +# Update OS packages & tidy up RUN dnf -y update && \ dnf clean all && \ rm -rf /var/cache/dnf From d5e992549603dad53f23a3b7f40e10ea2376ac85 Mon Sep 17 00:00:00 2001 From: Thomas Birkett Date: Fri, 3 Jan 2025 11:43:18 +0000 Subject: [PATCH 2/5] Make consistent use of LABEL's for images and add "author" information --- docker-c8/Dockerfile | 5 +++-- docker-c9/Dockerfile | 5 +++-- xrootd/Dockerfile | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docker-c8/Dockerfile b/docker-c8/Dockerfile index e75ac84..f551c7b 100644 --- a/docker-c8/Dockerfile +++ b/docker-c8/Dockerfile @@ -1,8 +1,9 @@ FROM rockylinux:8 # Add labels -LABEL source=https://github.com/stfc/grid-workernode -LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ +LABEL org.opencontainers.image.source=https://github.com/stfc/grid-workernode +LABEL org.opencontainers.image.authors=gstsm@stfc.atlassian.net +LABEL org.opencontainers.image.description="A specialised container image optimised for high-performance batch job execution in RAL's computing environment. \ It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." # Basic dependencies diff --git a/docker-c9/Dockerfile b/docker-c9/Dockerfile index 4cca34a..16d66d8 100644 --- a/docker-c9/Dockerfile +++ b/docker-c9/Dockerfile @@ -1,8 +1,9 @@ FROM rockylinux:9 # Add labels -LABEL source=https://github.com/stfc/grid-workernode -LABEL description="A specialised container image optimized for high-performance batch job execution in RAL's computing environment. \ +LABEL org.opencontainers.image.source=https://github.com/stfc/grid-workernode +LABEL org.opencontainers.image.authors=gstsm@stfc.atlassian.net +LABEL org.opencontainers.image.description="A specialised container image optimised for high-performance batch job execution in RAL's computing environment. \ It includes essential software, libraries, and dependencies, ensuring efficient, and scalable job processing, benefiting researchers and organisations." # Basic dependencies diff --git a/xrootd/Dockerfile b/xrootd/Dockerfile index 61fd0e5..de93362 100644 --- a/xrootd/Dockerfile +++ b/xrootd/Dockerfile @@ -7,6 +7,10 @@ ARG CEPH_VERSION=14.2.22-0 LABEL xrootd-ver=$XROOTD_VERSION LABEL xrdceph-ver=$XRDCEPH_VERSION LABEL ceph-ver=$CEPH_VERSION +LABEL org.opencontainers.image.source=https://github.com/stfc/grid-workernode +LABEL org.opencontainers.image.authors=gstsm@stfc.atlassian.net +LABEL org.opencontainers.image.description="A specialised container image optimised as a local XROOTD gateway in RAL's computing environment. \ +It includes software for XROOTD along with libraries, and dependencies, ensuring efficient, and scalable data staging, benefiting researchers and organisations." # xrootd user - needs to be consistent with the host RUN groupadd --gid 65432 xrootd && \ From 105a072b81571bd0456ec55dc5f9be2e953ea050 Mon Sep 17 00:00:00 2001 From: Thomas Birkett Date: Mon, 3 Mar 2025 16:46:52 +0000 Subject: [PATCH 3/5] Add wget package to container images. CMS use wget for their environment staging, without wget, the logs are full of errors --- docker-c8/Dockerfile | 3 ++- docker-c9/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-c8/Dockerfile b/docker-c8/Dockerfile index f551c7b..cd5815a 100644 --- a/docker-c8/Dockerfile +++ b/docker-c8/Dockerfile @@ -21,7 +21,8 @@ RUN dnf -y install \ attr \ tcsh \ numactl \ - bc && \ + bc \ + wget && \ # Clean up cache to keep layer size small dnf clean all && \ rm -rf /var/cache/dnf diff --git a/docker-c9/Dockerfile b/docker-c9/Dockerfile index 16d66d8..cb48ae3 100644 --- a/docker-c9/Dockerfile +++ b/docker-c9/Dockerfile @@ -21,7 +21,8 @@ RUN dnf -y install \ attr \ tcsh \ numactl \ - bc && \ + bc \ + wget && \ # Clean up cache to keep layer size small dnf clean all && \ rm -rf /var/cache/dnf From fd0d2af2bce7057537c4c01ec45f405d329fd602 Mon Sep 17 00:00:00 2001 From: Thomas Birkett Date: Mon, 3 Mar 2025 16:48:46 +0000 Subject: [PATCH 4/5] Remove Apptainer configuration as the defaults are now sensible. The default Apptainer configuration is now sensible and RAL can run with the defaults. Also the configuration syntax has changed causing the `sed` statement to incorrectly change some config lines --- docker-c8/Dockerfile | 7 ------- docker-c9/Dockerfile | 7 ------- 2 files changed, 14 deletions(-) diff --git a/docker-c8/Dockerfile b/docker-c8/Dockerfile index cd5815a..2cc43c1 100644 --- a/docker-c8/Dockerfile +++ b/docker-c8/Dockerfile @@ -67,10 +67,3 @@ RUN dnf -y update && \ # Create all possible pool accounts RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - - -# Disable overlay and loop device management in Apptainer -RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ - sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ - sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf && \ - # Deny setuid in Apptainer - sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf diff --git a/docker-c9/Dockerfile b/docker-c9/Dockerfile index cb48ae3..21a9b8b 100644 --- a/docker-c9/Dockerfile +++ b/docker-c9/Dockerfile @@ -67,10 +67,3 @@ RUN dnf -y update && \ # Create all possible pool accounts RUN curl -s https://raw.githubusercontent.com/stfc/grid-workernode/master/resources/pool_accounts/create.sh | bash - - -# Disable overlay and loop device management in Apptainer -RUN sed -i '/enable overlay/c\enable overlay = no' /etc/apptainer/apptainer.conf && \ - sed -i '/enable underlay/c\enable underlay = yes' /etc/apptainer/apptainer.conf && \ - sed -i '/max loop devices/c\max loop devices = 0' /etc/apptainer/apptainer.conf && \ - # Deny setuid in Apptainer - sed -i '/allow setuid/c\allow setuid = no' /etc/apptainer/apptainer.conf From dd3dc2842b903523afdf1a4ce506038cd601283c Mon Sep 17 00:00:00 2001 From: Thomas Birkett Date: Mon, 3 Mar 2025 17:20:40 +0000 Subject: [PATCH 5/5] Define distro and arch with variables rather than hard coding them in xrootd image --- xrootd/Dockerfile | 70 ++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/xrootd/Dockerfile b/xrootd/Dockerfile index de93362..770d977 100644 --- a/xrootd/Dockerfile +++ b/xrootd/Dockerfile @@ -4,6 +4,8 @@ FROM rockylinux:8 ARG XROOTD_VERSION=5.7.3-3 ARG XRDCEPH_VERSION=5.7.3-3 ARG CEPH_VERSION=14.2.22-0 +ARG ARCH=x86_64 +ARG DISTRO=el8 LABEL xrootd-ver=$XROOTD_VERSION LABEL xrdceph-ver=$XRDCEPH_VERSION LABEL ceph-ver=$CEPH_VERSION @@ -21,39 +23,39 @@ COPY *.repo /etc/yum.repos.d/ # Install versionlock, and configure versionlocks RUN dnf -y install python3-dnf-plugin-versionlock && \ - dnf -y versionlock add ceph-${CEPH_VERSION}.el8.x86_64 \ - ceph-base-${CEPH_VERSION}.el8.x86_64 \ - ceph-common-${CEPH_VERSION}.el8.x86_64 \ - ceph-mds-${CEPH_VERSION}.el8.x86_64 \ - ceph-mgr-${CEPH_VERSION}.el8.x86_64 \ - ceph-mon-${CEPH_VERSION}.el8.x86_64 \ - ceph-osd-${CEPH_VERSION}.el8.x86_64 \ - ceph-selinux-${CEPH_VERSION}.el8.x86_64 \ - libcephfs2-${CEPH_VERSION}.el8.x86_64 \ - librados2-${CEPH_VERSION}.el8.x86_64 \ - libradosstriper1-${CEPH_VERSION}.el8.x86_64 \ - librbd1-${CEPH_VERSION}.el8.x86_64 \ - librgw2-${CEPH_VERSION}.el8.x86_64 \ - python-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ - python-cephfs-${CEPH_VERSION}.el8.x86_64 \ - python-rados-${CEPH_VERSION}.el8.x86_64 \ - python-rbd-${CEPH_VERSION}.el8.x86_64 \ - python-rgw-${CEPH_VERSION}.el8.x86_64 \ - python3-ceph-argparse-${CEPH_VERSION}.el8.x86_64 \ - python3-cephfs-${CEPH_VERSION}.el8.x86_64 \ - python3-rados-${CEPH_VERSION}.el8.x86_64 \ - python3-rbd-${CEPH_VERSION}.el8.x86_64 \ - python3-rgw-${CEPH_VERSION}.el8.x86_64 \ - xrootd-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-client-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-client-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-selinux-${XROOTD_VERSION}.el8.noarch \ - xrootd-server-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-server-libs-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-ceph-buffered-${XRDCEPH_VERSION}.el8.x86_64 \ - xrootd-voms-${XROOTD_VERSION}.el8.x86_64 \ - xrootd-scitokens-${XROOTD_VERSION}.el8.x86_64 && \ + dnf -y versionlock add ceph-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-base-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-common-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-mds-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-mgr-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-mon-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-osd-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + ceph-selinux-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + libcephfs2-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + librados2-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + libradosstriper1-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + librbd1-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + librgw2-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python-ceph-argparse-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python-cephfs-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python-rados-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python-rbd-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python-rgw-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python3-ceph-argparse-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python3-cephfs-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python3-rados-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python3-rbd-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + python3-rgw-${CEPH_VERSION}.${DISTRO}.${ARCH} \ + xrootd-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-client-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-client-libs-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-libs-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-selinux-${XROOTD_VERSION}.${DISTRO}.noarch \ + xrootd-server-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-server-libs-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-ceph-buffered-${XRDCEPH_VERSION}.${DISTRO}.${ARCH} \ + xrootd-voms-${XROOTD_VERSION}.${DISTRO}.${ARCH} \ + xrootd-scitokens-${XROOTD_VERSION}.${DISTRO}.${ARCH} && \ # For debugging purposes, show the versionlock list dnf -y versionlock list @@ -79,7 +81,7 @@ RUN dnf -y install xrootd-ceph-buffered \ rm -rf /var/cache/dnf # For N2N mapping -RUN dnf -y install http://repos.gridpp.rl.ac.uk/yum/xrootd-cmstfc/el8/xrootd-cmstfc-1.5.2-6.osgroup.el8.x86_64.rpm +RUN dnf -y install http://repos.gridpp.rl.ac.uk/yum/xrootd-cmstfc/${DISTRO}/xrootd-cmstfc-1.5.2-6.osgroup.${DISTRO}.${ARCH}.rpm # Required for health-check scripts RUN dnf -y install openssl && \