Skip to content

Commit

Permalink
Change centos to rockylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Jul 11, 2024
1 parent 881f700 commit 58679a7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
3 changes: 3 additions & 0 deletions changelog.d/20240711_180511_steliosvoutsinas_DM_45210.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Bug fixes

- Change centos to rockylinux (centos endoflife)
18 changes: 9 additions & 9 deletions docker/cadc-postgresql-dev/Dockerfile.pg10
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
19 changes: 9 additions & 10 deletions docker/cadc-postgresql-dev/Dockerfile.pg12
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 58679a7

Please sign in to comment.