From e6801278fbdf06e314f7966b420cf8e9c8185c09 Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:14:51 +0200 Subject: [PATCH 1/6] Remove Oracle Instant Client from Dockerfiles --- daemons/Dockerfile | 12 ------------ init/Dockerfile | 3 --- probes/Dockerfile | 4 ---- server/Dockerfile | 13 ------------- ui/Dockerfile | 3 --- 5 files changed, 35 deletions(-) diff --git a/daemons/Dockerfile b/daemons/Dockerfile index 8c45d85..9a1c12e 100644 --- a/daemons/Dockerfile +++ b/daemons/Dockerfile @@ -34,18 +34,6 @@ RUN dnf install -y epel-release.noarch && \ dnf clean all && \ rm -rf /var/cache/dnf -# cx_oracle requires `gcc` and Python headers, not present by default on arm64 -ARG TARGETARCH -RUN if [ $TARGETARCH = "arm64" ]; then \ - dnf install -y \ - gcc \ - python3-devel \ - ; fi - -RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \ - echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \ - ldconfig - RUN python3 -m pip install --no-cache-dir --upgrade pip && \ python3 -m pip install --no-cache-dir --upgrade setuptools RUN python3 -m pip install --no-cache-dir --pre rucio[oracle,mysql,postgresql,globus]==$TAG diff --git a/init/Dockerfile b/init/Dockerfile index d4f3d82..0db3805 100644 --- a/init/Dockerfile +++ b/init/Dockerfile @@ -19,9 +19,6 @@ RUN dnf install -y epel-release.noarch && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \ - echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \ - ldconfig RUN python3 -m pip install --no-cache-dir --upgrade pip RUN python3 -m pip install --no-cache-dir --upgrade setuptools RUN python3 -m pip install --pre rucio[oracle,mysql,postgresql]==$TAG diff --git a/probes/Dockerfile b/probes/Dockerfile index f6809c6..f547e04 100644 --- a/probes/Dockerfile +++ b/probes/Dockerfile @@ -26,10 +26,6 @@ RUN dnf install -y epel-release.noarch && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \ - echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \ - ldconfig - RUN rpm -i https://github.com/dshearer/jobber/releases/download/v1.4.0/jobber-1.4.0-1.el7.x86_64.rpm RUN python3 -m pip install --no-cache-dir --upgrade pip diff --git a/server/Dockerfile b/server/Dockerfile index c727ee1..68ae697 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -25,19 +25,6 @@ RUN dnf install -y epel-release.noarch && \ dnf clean all && \ rm -rf /var/cache/dnf -# cx_oracle requires `gcc` and Python headers, not present by default on arm64 -ARG TARGETARCH -RUN if [ $TARGETARCH = "arm64" ]; then \ - dnf install -y \ - gcc \ - python3-devel \ - ; fi - - -RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \ - echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \ - ldconfig - RUN python3 -m pip install --no-cache-dir --upgrade pip && \ python3 -m pip install --no-cache-dir --upgrade setuptools RUN python3 -m pip install --no-cache-dir --pre rucio[oracle,mysql,postgresql]==$TAG diff --git a/ui/Dockerfile b/ui/Dockerfile index 43d8d23..ca81cc0 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -32,9 +32,6 @@ RUN dnf install -y epel-release.noarch && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN rpm -i https://download.oracle.com/otn_software/linux/instantclient/1912000/oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm; \ - echo "/usr/lib/oracle/19/client64/lib" >/etc/ld.so.conf.d/oracle.conf; \ - ldconfig RUN python3 -m pip install --no-cache-dir --upgrade pip RUN python3 -m pip install --no-cache-dir --upgrade setuptools RUN python3 -m pip install --no-cache-dir --pre rucio[oracle,mysql,postgresql]==$TAG From 8ac7e915691ea2b7e2271d517e5105e66a7b174c Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:47:31 +0200 Subject: [PATCH 2/6] Fix typo in `ADD` command for `entrypoint.sh` in Dockerfile --- clients/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/Dockerfile b/clients/Dockerfile index 2644364..d01b79f 100644 --- a/clients/Dockerfile +++ b/clients/Dockerfile @@ -41,7 +41,7 @@ WORKDIR /home/user # Add the default rucio configuration ADD --chown=user:user rucio.default.cfg /opt/user/rucio.default.cfg ADD init_rucio.sh /etc/profile.d/rucio_init.sh -ADD --chown=user;user ./entrypoint.sh /opt/user/entrypoint.sh +ADD --chown=user:user ./entrypoint.sh /opt/user/entrypoint.sh ENV PATH $PATH:/opt/rucio/bin From e96d82dd23e5bcd139ca08118e53b9139b548501 Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:28:23 +0200 Subject: [PATCH 3/6] Remove unused `libnsl` and `libaio` from Dockerfile These were (probably) only needed when `cx_oracle` was used. --- daemons/Dockerfile | 2 -- dev/Dockerfile | 1 - fts-cron/Dockerfile_cpp | 2 +- fts-cron/Dockerfile_java | 2 +- init/Dockerfile | 2 -- probes/Dockerfile | 2 -- server/Dockerfile | 2 -- ui/Dockerfile | 2 -- 8 files changed, 2 insertions(+), 13 deletions(-) diff --git a/daemons/Dockerfile b/daemons/Dockerfile index 9a1c12e..826e37c 100644 --- a/daemons/Dockerfile +++ b/daemons/Dockerfile @@ -19,8 +19,6 @@ RUN dnf install -y epel-release.noarch && \ gfal2-plugin-http \ gfal2-plugin-srm \ gfal2-plugin-xrootd \ - libnsl \ - libaio \ patch \ python-gfal2 \ procps-ng \ diff --git a/dev/Dockerfile b/dev/Dockerfile index 51ad585..2a8ee19 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -30,7 +30,6 @@ RUN dnf -y install yum-utils epel-release.noarch && \ gridsite \ httpd \ krb5-devel \ - libaio \ libtool-ltdl-devel \ libxml2-devel \ mariadb-connector-c \ diff --git a/fts-cron/Dockerfile_cpp b/fts-cron/Dockerfile_cpp index fd75e71..b54dba3 100644 --- a/fts-cron/Dockerfile_cpp +++ b/fts-cron/Dockerfile_cpp @@ -15,7 +15,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf - RUN dnf -y install -y httpd python-pip python-mod_wsgi libaio gcc python-devel mod_ssl openssl-devel python3-m2crypto libnsl patch xrootd-client && \ + RUN dnf -y install -y httpd python-pip python-mod_wsgi gcc python-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/fts-cron/Dockerfile_java b/fts-cron/Dockerfile_java index 53f09b7..0d73947 100644 --- a/fts-cron/Dockerfile_java +++ b/fts-cron/Dockerfile_java @@ -14,7 +14,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN dnf -y install httpd python-pip python-mod_wsgi libaio gcc python-devel mod_ssl openssl-devel python3-m2crypto libnsl patch xrootd-client && \ +RUN dnf -y install httpd python-pip python-mod_wsgi gcc python-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/init/Dockerfile b/init/Dockerfile index 0db3805..2f9f31f 100644 --- a/init/Dockerfile +++ b/init/Dockerfile @@ -8,8 +8,6 @@ RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ gcc \ - libnsl \ - libaio \ openssl-devel \ mod_ssl \ procps-ng \ diff --git a/probes/Dockerfile b/probes/Dockerfile index f547e04..9cf3a93 100644 --- a/probes/Dockerfile +++ b/probes/Dockerfile @@ -17,8 +17,6 @@ RUN dnf install -y epel-release.noarch && \ dnf install -y \ git \ gcc \ - libnsl \ - libaio \ openssl-devel \ procps-ng \ python-devel \ diff --git a/server/Dockerfile b/server/Dockerfile index 68ae697..fe17275 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -14,8 +14,6 @@ RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ gridsite \ - libnsl \ - libaio \ patch \ procps-ng \ python-pip \ diff --git a/ui/Dockerfile b/ui/Dockerfile index ca81cc0..17fe8d3 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -18,8 +18,6 @@ RUN dnf install -y epel-release.noarch && \ dnf install -y \ gcc \ httpd \ - libnsl \ - libaio \ openssl-devel \ mod_ssl \ procps-ng \ From b9cd493e6e0d2d3279966fca8754a900093efa88 Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:49:32 +0200 Subject: [PATCH 4/6] Migrate all Dockerfiles to use `python3-pip` and `python3-*` packages instead of `python-*` equivalents. --- daemons/Dockerfile | 4 ++-- fts-cron/Dockerfile_cpp | 2 +- fts-cron/Dockerfile_java | 4 ++-- init/Dockerfile | 4 ++-- probes/Dockerfile | 4 ++-- server/Dockerfile | 4 ++-- test-ssh/Dockerfile | 2 +- ui/Dockerfile | 4 ++-- webui/Dockerfile | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/daemons/Dockerfile b/daemons/Dockerfile index 826e37c..23a531f 100644 --- a/daemons/Dockerfile +++ b/daemons/Dockerfile @@ -22,8 +22,8 @@ RUN dnf install -y epel-release.noarch && \ patch \ python-gfal2 \ procps-ng \ - python-pip \ - python-mod_wsgi \ + python3-pip \ + python3-mod_wsgi \ sendmail \ sendmail-cf \ memcached \ diff --git a/fts-cron/Dockerfile_cpp b/fts-cron/Dockerfile_cpp index b54dba3..18fe241 100644 --- a/fts-cron/Dockerfile_cpp +++ b/fts-cron/Dockerfile_cpp @@ -15,7 +15,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf - RUN dnf -y install -y httpd python-pip python-mod_wsgi gcc python-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ + RUN dnf -y install -y httpd python3-pip python3-mod_wsgi gcc python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/fts-cron/Dockerfile_java b/fts-cron/Dockerfile_java index 0d73947..07f2009 100644 --- a/fts-cron/Dockerfile_java +++ b/fts-cron/Dockerfile_java @@ -14,7 +14,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN dnf -y install httpd python-pip python-mod_wsgi gcc python-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ +RUN dnf -y install httpd python3-pip python3-mod_wsgi gcc python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf @@ -25,7 +25,7 @@ RUN chmod +x /usr/bin/kubectl # Install VOMS and FTS clients for delegating proxies RUN dnf -y install ca-certificates.noarch ca-policy-lcg fetch-crl voms-clients-java fts-rest-cli \ wlcg-iam-lsc-atlas wlcg-iam-vomses-atlas wlcg-iam-lsc-cms wlcg-iam-vomses-cms \ - python-pip python-setuptools python-requests && \ + python3-pip python-setuptools python-requests && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/init/Dockerfile b/init/Dockerfile index 2f9f31f..6d569d2 100644 --- a/init/Dockerfile +++ b/init/Dockerfile @@ -11,9 +11,9 @@ RUN dnf install -y epel-release.noarch && \ openssl-devel \ mod_ssl \ procps-ng \ - python-devel \ + python3-devel \ python3-m2crypto \ - python-pip && \ + python3-pip && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/probes/Dockerfile b/probes/Dockerfile index 9cf3a93..4f3114c 100644 --- a/probes/Dockerfile +++ b/probes/Dockerfile @@ -19,8 +19,8 @@ RUN dnf install -y epel-release.noarch && \ gcc \ openssl-devel \ procps-ng \ - python-devel \ - python-pip && \ + python3-devel \ + python3-pip && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/server/Dockerfile b/server/Dockerfile index fe17275..06995ed 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -16,8 +16,8 @@ RUN dnf install -y epel-release.noarch && \ gridsite \ patch \ procps-ng \ - python-pip \ - python-mod_wsgi \ + python3-pip \ + python3-mod_wsgi \ memcached \ patchutils && \ dnf clean all && \ diff --git a/test-ssh/Dockerfile b/test-ssh/Dockerfile index ec45c30..437f1c6 100644 --- a/test-ssh/Dockerfile +++ b/test-ssh/Dockerfile @@ -6,7 +6,7 @@ RUN dnf install -y epel-release.noarch && \ gcc \ openssh-server \ openssh-clients \ - python-pip \ + python3-pip \ rsync \ sudo \ unzip && \ diff --git a/ui/Dockerfile b/ui/Dockerfile index 17fe8d3..73580f6 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -23,10 +23,10 @@ RUN dnf install -y epel-release.noarch && \ procps-ng \ python3-mod_wsgi \ python3-m2crypto \ - python-devel \ + python3-devel \ patch \ patchutils \ - python-pip && \ + python3-pip && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/webui/Dockerfile b/webui/Dockerfile index 63576c8..fed80f3 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -17,7 +17,7 @@ RUN dnf -y update && \ dnf -y module reset nodejs && \ dnf -y module enable nodejs:20 && \ dnf -y module install nodejs:20/common && \ - dnf -y install httpd mod_ssl python39 python-pip git procps patch patchutils && \ + dnf -y install httpd mod_ssl python39 python3-pip git procps patch patchutils && \ dnf -y install wget && \ dnf clean all && \ rm -rf /var/cache/dnf From 0659a71e0789849909434e9c17917725b08a2d60 Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:53:26 +0200 Subject: [PATCH 5/6] Remove `gcc` across the Dockerfiles Except for the case of the `dev` image, `gcc` was likely needed only to support `cx_oracle` (which is no gone). --- fts-cron/Dockerfile_cpp | 2 +- fts-cron/Dockerfile_java | 2 +- init/Dockerfile | 1 - probes/Dockerfile | 1 - test-ssh/Dockerfile | 1 - ui/Dockerfile | 1 - 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/fts-cron/Dockerfile_cpp b/fts-cron/Dockerfile_cpp index 18fe241..5b56a33 100644 --- a/fts-cron/Dockerfile_cpp +++ b/fts-cron/Dockerfile_cpp @@ -15,7 +15,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf - RUN dnf -y install -y httpd python3-pip python3-mod_wsgi gcc python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ + RUN dnf -y install -y httpd python3-pip python3-mod_wsgi python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/fts-cron/Dockerfile_java b/fts-cron/Dockerfile_java index 07f2009..94028bc 100644 --- a/fts-cron/Dockerfile_java +++ b/fts-cron/Dockerfile_java @@ -14,7 +14,7 @@ RUN dnf update -y && \ dnf clean all && \ rm -rf /var/cache/dnf -RUN dnf -y install httpd python3-pip python3-mod_wsgi gcc python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ +RUN dnf -y install httpd python3-pip python3-mod_wsgi python3-devel mod_ssl openssl-devel python3-m2crypto patch xrootd-client && \ dnf clean all && \ rm -rf /var/cache/dnf diff --git a/init/Dockerfile b/init/Dockerfile index 6d569d2..079b4d4 100644 --- a/init/Dockerfile +++ b/init/Dockerfile @@ -7,7 +7,6 @@ WORKDIR /tmp RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ - gcc \ openssl-devel \ mod_ssl \ procps-ng \ diff --git a/probes/Dockerfile b/probes/Dockerfile index 4f3114c..6cd9ed5 100644 --- a/probes/Dockerfile +++ b/probes/Dockerfile @@ -16,7 +16,6 @@ RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ git \ - gcc \ openssl-devel \ procps-ng \ python3-devel \ diff --git a/test-ssh/Dockerfile b/test-ssh/Dockerfile index 437f1c6..07b4303 100644 --- a/test-ssh/Dockerfile +++ b/test-ssh/Dockerfile @@ -3,7 +3,6 @@ FROM almalinux:9 RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ - gcc \ openssh-server \ openssh-clients \ python3-pip \ diff --git a/ui/Dockerfile b/ui/Dockerfile index 73580f6..1dc80b5 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -16,7 +16,6 @@ WORKDIR /tmp RUN dnf install -y epel-release.noarch && \ dnf upgrade -y && \ dnf install -y \ - gcc \ httpd \ openssl-devel \ mod_ssl \ From 6ed36af841b991392a05ef222dd37b5b00523fe0 Mon Sep 17 00:00:00 2001 From: Dimitris Xenakis Date: Thu, 17 Jul 2025 11:54:06 +0200 Subject: [PATCH 6/6] Add license headers to Dockerfiles in `clients` and `init` directories --- clients/Dockerfile | 6 ++++++ init/Dockerfile | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/clients/Dockerfile b/clients/Dockerfile index d01b79f..a162d4c 100644 --- a/clients/Dockerfile +++ b/clients/Dockerfile @@ -1,3 +1,9 @@ +# Copyright European Organization for Nuclear Research (CERN) 2025 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + FROM almalinux:9 ARG TAG diff --git a/init/Dockerfile b/init/Dockerfile index 079b4d4..dd67bb5 100644 --- a/init/Dockerfile +++ b/init/Dockerfile @@ -1,3 +1,9 @@ +# Copyright European Organization for Nuclear Research (CERN) 2025 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + FROM almalinux:9 ARG TAG