From f4919d3fbb2718cb28ca18f21191d6636c47247d Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Fri, 23 Feb 2024 13:27:37 +0100
Subject: [PATCH] lcs128: updated Dockerfile_ci_base to be based on
 centos7.9.2009 and made the postgres dependencies working again

---
 Docker/lofar-ci/Dockerfile_ci_base | 16 +++-------------
 Docker/lofar-ci/Dockerfile_ci_scu  |  6 +++---
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/Docker/lofar-ci/Dockerfile_ci_base b/Docker/lofar-ci/Dockerfile_ci_base
index 80d5d4b0be4..c7a9d9580c7 100644
--- a/Docker/lofar-ci/Dockerfile_ci_base
+++ b/Docker/lofar-ci/Dockerfile_ci_base
@@ -4,9 +4,10 @@
 # base
 #
 # Base image limited by Cobalt / MAC compatability
-FROM centos:centos7.6.1810
+FROM centos:centos7.9.2009
 
-RUN yum -y groupinstall 'Development Tools' && \
+RUN yum -y upgrade ca-certificates && \
+    yum -y groupinstall 'Development Tools' && \
     yum -y install epel-release && \
     yum -y install cmake cmake3 gcc git log4cplus-devel python3 python3-devel python3-pip which wget curl atop valgrind vim && \
     python3 -m pip install -U pip && \
@@ -14,14 +15,3 @@ RUN yum -y groupinstall 'Development Tools' && \
     adduser lofarsys && \
     mkdir -p /opt/lofar && chown -R lofarsys:lofarsys /opt
 
-# Ensure up to date certificate chains
-RUN yum -y upgrade ca-certificates
-
-# Upgrade cmake
-RUN yum -y install make gcc-c++ wget
-RUN cd /tmp && \
-    wget https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz && \
-    tar xfz cmake-3.25.1.tar.gz && \
-    cd cmake-3.25.1 && \
-    ./bootstrap --prefix=/usr/local -- -DCMAKE_USE_OPENSSL=OFF && \
-    gmake -j 3 install
diff --git a/Docker/lofar-ci/Dockerfile_ci_scu b/Docker/lofar-ci/Dockerfile_ci_scu
index a8257a0b1d1..3665dc378be 100644
--- a/Docker/lofar-ci/Dockerfile_ci_scu
+++ b/Docker/lofar-ci/Dockerfile_ci_scu
@@ -12,10 +12,12 @@ RUN echo "Installing packages for SAS..." && \
 # see https://www.postgresql.org/download/linux/redhat/ on how to install postgresql-server >= 11 on centos7
 RUN yum erase -y postgresql postgresql-server postgresql-devel && \
     yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
-    yum install -y postgresql12-server
+    yum install -y postgresql12-server libpq5-devel
 ENV PATH /usr/pgsql-12/bin:$PATH
 ENV LD_LIBRARY_PATH /usr/pgsql-12/lib:$LD_LIBRARY_PATH
 
+RUN pip3 install cython kombu lxml requests pygcn xmljson mysql-connector-python python-dateutil Django==3.0.9 djangorestframework==3.11.1 djangorestframework-xml ldap==1.0.2 flask fabric coverage python-qpid-proton numpy h5py psycopg2 testing.postgresql Flask-Testing scipy Markdown django-filter python-ldap python-ldap-test ldap3 django-jsonforms django-json-widget django-jsoneditor drf-yasg flex swagger-spec-validator django-auth-ldap mozilla-django-oidc jsonschema comet pyxb==1.2.5 graphviz isodate astropy packaging django-debug-toolbar pymysql astroplan SimpleWebSocketServer websocket_client drf-flex-fields django-property-filter cx_Oracle cachetools gunicorn gevent ujson orjson matplotlib
+
 # Oracle decided in all its wisdom to not make use of rpm/deb
 # So, we're forced to download the Oracle client packages, and configure the paths
 RUN mkdir -p /opt/oracle && \
@@ -24,6 +26,4 @@ RUN mkdir -p /opt/oracle && \
     unzip instantclient-basic-linux.x64-21.1.0.0.0.zip
 ENV LD_LIBRARY_PATH /opt/oracle/instantclient_21_1:$LD_LIBRARY_PATH
 
-RUN pip3 install cython kombu lxml requests pygcn xmljson mysql-connector-python python-dateutil Django==3.0.9 djangorestframework==3.11.1 djangorestframework-xml ldap==1.0.2 flask fabric coverage python-qpid-proton numpy h5py psycopg2 testing.postgresql Flask-Testing scipy Markdown django-filter python-ldap python-ldap-test ldap3 django-jsonforms django-json-widget django-jsoneditor drf-yasg flex swagger-spec-validator django-auth-ldap mozilla-django-oidc jsonschema comet pyxb==1.2.5 graphviz isodate astropy packaging django-debug-toolbar pymysql astroplan SimpleWebSocketServer websocket_client drf-flex-fields django-property-filter cx_Oracle cachetools gunicorn gevent ujson orjson matplotlib
-
 USER lofarsys
-- 
GitLab