From 58679a75b15342d5b9a7805aa18eede4edd430c7 Mon Sep 17 00:00:00 2001 From: Stelios Voutsinas Date: Thu, 11 Jul 2024 11:06:37 -0700 Subject: [PATCH] Change centos to rockylinux --- ...240711_180511_steliosvoutsinas_DM_45210.md | 3 +++ docker/cadc-postgresql-dev/Dockerfile.pg10 | 18 +++++++++--------- docker/cadc-postgresql-dev/Dockerfile.pg12 | 19 +++++++++---------- 3 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 changelog.d/20240711_180511_steliosvoutsinas_DM_45210.md diff --git a/changelog.d/20240711_180511_steliosvoutsinas_DM_45210.md b/changelog.d/20240711_180511_steliosvoutsinas_DM_45210.md new file mode 100644 index 0000000..fd11725 --- /dev/null +++ b/changelog.d/20240711_180511_steliosvoutsinas_DM_45210.md @@ -0,0 +1,3 @@ +### Bug fixes + +- Change centos to rockylinux (centos endoflife) diff --git a/docker/cadc-postgresql-dev/Dockerfile.pg10 b/docker/cadc-postgresql-dev/Dockerfile.pg10 index 051a588..e6fce89 100644 --- a/docker/cadc-postgresql-dev/Dockerfile.pg10 +++ b/docker/cadc-postgresql-dev/Dockerfile.pg10 @@ -1,24 +1,24 @@ -FROM centos:7 +FROM rockylinux:8 # To allow --build-arg switch -ARG PG_RPM_URL=https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm +ARG PG_RPM_URL=https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm # install required software -RUN yum update -y +RUN dnf update -y # repositories and keys -RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ - && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 -RUN yum install -y ${PG_RPM_URL} \ +RUN dnf install -y epel-release \ + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +RUN dnf install -y ${PG_RPM_URL} \ && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG # packages -RUN yum -y install postgresql10-server-10.9-1PGDG.rhel7 postgresql10-contrib-10.9-1PGDG.rhel7 postgresql10-devel-10.9-1PGDG.rhel7 +RUN dnf -y install postgresql10-server postgresql10-contrib postgresql10-devel # CADC build of pgsphere for postgresql10-server -RUN yum -y install https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/software/pgsphere10-1.1.5-1.el7.centos.x86_64.rpm +RUN dnf -y install https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/software/pgsphere10-1.1.5-1.el8.x86_64.rpm -RUN yum clean all +RUN dnf clean all RUN mkdir -p /logs COPY src/init/* /var/lib/pgsql/10/ diff --git a/docker/cadc-postgresql-dev/Dockerfile.pg12 b/docker/cadc-postgresql-dev/Dockerfile.pg12 index 543f6ca..52096bd 100644 --- a/docker/cadc-postgresql-dev/Dockerfile.pg12 +++ b/docker/cadc-postgresql-dev/Dockerfile.pg12 @@ -1,22 +1,21 @@ -FROM centos:7 +FROM rockylinux:8 # external URLs; allow --build-arg switch -ARG PGDG=https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -ARG PGSPHERE=https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/software/pgsphere12-1.2.0-1.el7.x86_64.rpm +ARG PGDG=https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm +ARG PGSPHERE=https://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/software/pgsphere12-1.2.0-1.el8.x86_64.rpm # repositories and keys -RUN yum -y install centos-release-scl epel-release ${PGDG} \ - && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \ - && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo \ +RUN dnf -y install ${PGDG} \ + && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rocky \ + && dnf -y install epel-release \ && rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n' - + # packages -RUN yum -y install postgresql12-server postgresql12-contrib ${PGSPHERE} \ - && yum -y clean all +RUN dnf -y install postgresql12-server postgresql12-contrib ${PGSPHERE} \ + && dnf -y clean all RUN mkdir -p /logs COPY src/init/* /var/lib/pgsql/12/ COPY src/cadc-dev-postgresql-start-12 /usr/bin/cadc-dev-postgresql-start CMD ["/usr/bin/cadc-dev-postgresql-start"] -