Skip to content

Commit

Permalink
NGPM-554: update rocky8 base image to fix high security vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrangelo committed Sep 27, 2023
1 parent 7968421 commit 1720b7f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Dockerfile.rocky8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rockylinux:8.7
FROM rockylinux:8.8

ARG TARGETPLATFORM

Expand All @@ -11,17 +11,17 @@ ENV POSTGRESQL_ADMIN_PASSWORD=${POSTGRESQL_ADMIN_PASSWORD}
ENV PATH $PATH:$PGDATA

# Install PostgreSQL for linux/amd64
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then \
dnf update -y && \
dnf install -y langpacks-en glibc-all-langpacks -y \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-server-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-libs-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-contrib-14.8-1PGDG.rhel8.x86_64.rpm; \
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ] ; then \
dnf update -y && \
dnf install -y langpacks-en glibc-all-langpacks -y \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-server-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-libs-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-14.8-1PGDG.rhel8.x86_64.rpm \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-x86_64/postgresql14-contrib-14.8-1PGDG.rhel8.x86_64.rpm; \
fi

# Install PostgreSQL for linux/arm64
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ] ; then \
dnf update -y && \
dnf install -y langpacks-en glibc-all-langpacks -y \
https://download.postgresql.org/pub/repos/yum/14/redhat/rhel-8.7-aarch64/postgresql14-server-14.8-1PGDG.rhel8.aarch64.rpm \
Expand All @@ -32,6 +32,7 @@ RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then \

COPY docker-entrypoint.sh /
COPY check-container /usr/libexec/

RUN chmod a+xr /docker-entrypoint.sh \
&& usermod -a -G root postgres \
&& chgrp -R root "/var/lib/pgsql/" \
Expand Down

0 comments on commit 1720b7f

Please sign in to comment.