diff --git a/percona-distribution-postgresql-12/Dockerfile b/percona-distribution-postgresql-12/Dockerfile index 7b616f33..7648e8a4 100644 --- a/percona-distribution-postgresql-12/Dockerfile +++ b/percona-distribution-postgresql-12/Dockerfile @@ -1,14 +1,23 @@ -FROM redhat/ubi8-minimal +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" RUN microdnf -y update; \ microdnf -y install glibc-langpack-en -ENV PPG_VERSION 12.20-1 +ENV PPG_VERSION 12.22-1 ENV PPG_MAJOR_VERSION 12 -ENV PPG_MINOR_VERSION 20 -ENV OS_VER el8 +ENV PPG_MINOR_VERSION 22 +ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing ENV PPG_REPO_VERSION "${PPG_MAJOR_VERSION}.${PPG_MINOR_VERSION}" @@ -33,7 +42,6 @@ RUN set -ex; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; @@ -59,14 +67,17 @@ RUN set -ex; \ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres -RUN set -ex; \ - export GNUPGHOME="$(mktemp -d)"; \ - curl -Lf -o /tmp/perl-JSON.rpm http://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/perl-JSON-2.97.001-2.el8.noarch.rpm; \ - rpmkeys --checksig /tmp/perl-JSON.rpm; \ - rpm -i /tmp/perl-JSON.rpm - ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ diff --git a/percona-distribution-postgresql-12/Dockerfile.aarch64 b/percona-distribution-postgresql-12/Dockerfile.aarch64 index df219cac..7648e8a4 100644 --- a/percona-distribution-postgresql-12/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-12/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 12.19-1 +ENV PPG_VERSION 12.22-1 ENV PPG_MAJOR_VERSION 12 -ENV PPG_MINOR_VERSION 19 +ENV PPG_MINOR_VERSION 22 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,21 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -50,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -71,9 +88,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION} \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \ diff --git a/percona-distribution-postgresql-13/Dockerfile b/percona-distribution-postgresql-13/Dockerfile index 0215fa9d..4d5f9919 100644 --- a/percona-distribution-postgresql-13/Dockerfile +++ b/percona-distribution-postgresql-13/Dockerfile @@ -1,14 +1,23 @@ -FROM redhat/ubi8-minimal +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" RUN microdnf -y update; \ microdnf -y install glibc-langpack-en -ENV PPG_VERSION 13.16-1 +ENV PPG_VERSION 13.18-1 ENV PPG_MAJOR_VERSION 13 -ENV PPG_MINOR_VERSION 16 -ENV OS_VER el8 +ENV PPG_MINOR_VERSION 18 +ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing ENV PPG_REPO_VERSION "${PPG_MAJOR_VERSION}.${PPG_MINOR_VERSION}" @@ -33,7 +42,6 @@ RUN set -ex; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; @@ -59,14 +67,17 @@ RUN set -ex; \ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres -RUN set -ex; \ - export GNUPGHOME="$(mktemp -d)"; \ - curl -Lf -o /tmp/perl-JSON.rpm http://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/perl-JSON-2.97.001-2.el8.noarch.rpm; \ - rpmkeys --checksig /tmp/perl-JSON.rpm; \ - rpm -i /tmp/perl-JSON.rpm - ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ diff --git a/percona-distribution-postgresql-13/Dockerfile.aarch64 b/percona-distribution-postgresql-13/Dockerfile.aarch64 index 3c5761a5..4d5f9919 100644 --- a/percona-distribution-postgresql-13/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-13/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 13.16-1 +ENV PPG_VERSION 13.18-1 ENV PPG_MAJOR_VERSION 13 -ENV PPG_MINOR_VERSION 16 +ENV PPG_MINOR_VERSION 18 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,21 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -50,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -72,9 +89,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \ diff --git a/percona-distribution-postgresql-14/Dockerfile b/percona-distribution-postgresql-14/Dockerfile index 539ab1f0..6589a470 100644 --- a/percona-distribution-postgresql-14/Dockerfile +++ b/percona-distribution-postgresql-14/Dockerfile @@ -1,14 +1,23 @@ -FROM redhat/ubi8-minimal +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" RUN microdnf -y update; \ microdnf -y install glibc-langpack-en -ENV PPG_VERSION 14.13-1 +ENV PPG_VERSION 14.15-1 ENV PPG_MAJOR_VERSION 14 -ENV PPG_MINOR_VERSION 13 -ENV OS_VER el8 +ENV PPG_MINOR_VERSION 15 +ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing ENV PPG_REPO_VERSION "${PPG_MAJOR_VERSION}.${PPG_MINOR_VERSION}" @@ -33,7 +42,6 @@ RUN set -ex; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; @@ -59,14 +67,17 @@ RUN set -ex; \ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres -RUN set -ex; \ - export GNUPGHOME="$(mktemp -d)"; \ - curl -Lf -o /tmp/perl-JSON.rpm http://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/perl-JSON-2.97.001-2.el8.noarch.rpm; \ - rpmkeys --checksig /tmp/perl-JSON.rpm; \ - rpm -i /tmp/perl-JSON.rpm - ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ diff --git a/percona-distribution-postgresql-14/Dockerfile.aarch64 b/percona-distribution-postgresql-14/Dockerfile.aarch64 index 7595de83..6589a470 100644 --- a/percona-distribution-postgresql-14/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-14/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 14.13-1 +ENV PPG_VERSION 14.15-1 ENV PPG_MAJOR_VERSION 14 -ENV PPG_MINOR_VERSION 13 +ENV PPG_MINOR_VERSION 15 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,21 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -50,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -72,9 +89,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \ diff --git a/percona-distribution-postgresql-15/Dockerfile b/percona-distribution-postgresql-15/Dockerfile index 46d6cbf3..b2fb3cc0 100644 --- a/percona-distribution-postgresql-15/Dockerfile +++ b/percona-distribution-postgresql-15/Dockerfile @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 15.8-1 +ENV PPG_VERSION 15.10-1 ENV PPG_MAJOR_VERSION 15 -ENV PPG_MINOR_VERSION 8 +ENV PPG_MINOR_VERSION 10 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,19 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -48,12 +56,12 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ @@ -61,8 +69,17 @@ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -72,7 +89,7 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ + microdnf clean all; \ rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d diff --git a/percona-distribution-postgresql-15/Dockerfile.aarch64 b/percona-distribution-postgresql-15/Dockerfile.aarch64 index 15038568..b2fb3cc0 100644 --- a/percona-distribution-postgresql-15/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-15/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 15.8-1 +ENV PPG_VERSION 15.10-1 ENV PPG_MAJOR_VERSION 15 -ENV PPG_MINOR_VERSION 8 +ENV PPG_MINOR_VERSION 10 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,22 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -51,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -73,9 +89,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \ diff --git a/percona-distribution-postgresql-16/Dockerfile b/percona-distribution-postgresql-16/Dockerfile index a6743d9c..1a863db7 100644 --- a/percona-distribution-postgresql-16/Dockerfile +++ b/percona-distribution-postgresql-16/Dockerfile @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 16.4-1 +ENV PPG_VERSION 16.6-1 ENV PPG_MAJOR_VERSION 16 -ENV PPG_MINOR_VERSION 4 +ENV PPG_MINOR_VERSION 6 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,19 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -48,12 +56,12 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ @@ -61,8 +69,17 @@ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -72,7 +89,7 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ + microdnf clean all; \ rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d diff --git a/percona-distribution-postgresql-16/Dockerfile.aarch64 b/percona-distribution-postgresql-16/Dockerfile.aarch64 index a104a455..1a863db7 100644 --- a/percona-distribution-postgresql-16/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-16/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 16.4-1 +ENV PPG_VERSION 16.6-1 ENV PPG_MAJOR_VERSION 16 -ENV PPG_MINOR_VERSION 4 +ENV PPG_MINOR_VERSION 6 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,22 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -51,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -73,9 +89,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \ diff --git a/percona-distribution-postgresql-17/Dockerfile b/percona-distribution-postgresql-17/Dockerfile index f6e54407..19c206d8 100644 --- a/percona-distribution-postgresql-17/Dockerfile +++ b/percona-distribution-postgresql-17/Dockerfile @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 17.0-1 +ENV PPG_VERSION 17.2-1 ENV PPG_MAJOR_VERSION 17 -ENV PPG_MINOR_VERSION 0 +ENV PPG_MINOR_VERSION 2 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,19 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -48,12 +56,12 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ @@ -61,8 +69,17 @@ RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ ENV PGDATA /data/db +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -72,7 +89,7 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ + microdnf clean all; \ rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d diff --git a/percona-distribution-postgresql-17/Dockerfile.aarch64 b/percona-distribution-postgresql-17/Dockerfile.aarch64 index 1acf8dbc..19c206d8 100644 --- a/percona-distribution-postgresql-17/Dockerfile.aarch64 +++ b/percona-distribution-postgresql-17/Dockerfile.aarch64 @@ -1,13 +1,22 @@ -FROM oraclelinux:9 +FROM oraclelinux:9 AS downloader + +RUN yum install -y epel-release; \ + yum config-manager --set-enabled ol9_codeready_builder; \ + yum install -y --downloadonly perl-JSON; \ + mkdir -p downloaded-packages; \ + cp -rp /var/cache/dnf/ol9_appstream-*/packages/*.rpm downloaded-packages; \ + tar -cvzf downloaded-packages.tar.gz downloaded-packages + +FROM redhat/ubi9-minimal LABEL org.opencontainers.image.authors="info@percona.com" -RUN dnf -y update; \ - dnf -y install glibc-langpack-en +RUN microdnf -y update; \ + microdnf -y install glibc-langpack-en -ENV PPG_VERSION 17.0-1 +ENV PPG_VERSION 17.2-1 ENV PPG_MAJOR_VERSION 17 -ENV PPG_MINOR_VERSION 0 +ENV PPG_MINOR_VERSION 2 ENV OS_VER el9 ENV FULL_PERCONA_VERSION "${PPG_VERSION}.${OS_VER}" ENV PPG_REPO testing @@ -27,22 +36,18 @@ RUN set -ex; \ gpg --batch --export --armor 4D1BB29D63D98E422B2113B19334A25F8507EFA5 > ${GNUPGHOME}/PERCONA-PACKAGING-KEY; \ gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ rpmkeys --import ${GNUPGHOME}/PERCONA-PACKAGING-KEY ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \ - dnf install -y findutils; \ + microdnf install -y findutils; \ curl -Lf -o /tmp/percona-release.rpm https://repo.percona.com/yum/percona-release-latest.noarch.rpm; \ rpmkeys --checksig /tmp/percona-release.rpm; \ rpm -i /tmp/percona-release.rpm; \ rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \ rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \ - #percona-release setup -y ppg${PPG_MAJOR_VERSION}; \ - curl -Lf -o /tmp/percona-release https://raw.githubusercontent.com/percona/percona-repositories/release-1.0-28/scripts/percona-release.sh; \ - mv /tmp/percona-release /usr/bin/; \ - chmod +x /usr/bin/percona-release; \ - percona-release enable telemetry ${PPG_REPO}; \ + percona-release enable telemetry ${PPG_REPO}; \ percona-release enable ppg-${PPG_REPO_VERSION} ${PPG_REPO}; RUN set -ex; \ - dnf -y update; \ - dnf -y install \ + microdnf -y update; \ + microdnf -y install \ bind-utils \ gettext \ hostname \ @@ -51,19 +56,30 @@ RUN set -ex; \ bzip2 \ lz4 \ procps-ng; \ - dnf -y install \ + microdnf -y install \ nss_wrapper \ shadow-utils \ libpq \ libedit; \ - dnf clean all + microdnf clean all # the numeric UID is needed for OpenShift RUN useradd -u 1001 -r -g 0 -s /sbin/nologin \ -c "Default Application User" postgres +ENV PGDATA /data/db + +COPY --from=downloader /downloaded-packages.tar.gz . +RUN tar -xvzf downloaded-packages.tar.gz; \ + cd downloaded-packages; \ + rpm -ivh perl-*.rpm; \ + rpm -ivh perl-JSON*.rpm; \ + rm -f /downloaded-packages.tar.gz; \ + cd -; \ + rm -rf /downloaded-packages /var/cache/dnf /var/cache/yum + RUN set -ex; \ - dnf install -y \ + microdnf install -y \ percona-postgresql${PPG_MAJOR_VERSION}-server-${FULL_PERCONA_VERSION} \ percona-postgresql${PPG_MAJOR_VERSION}-contrib-${FULL_PERCONA_VERSION} \ percona-postgresql-common \ @@ -73,9 +89,9 @@ RUN set -ex; \ percona-pgaudit${PPG_MAJOR_VERSION}_set_user \ percona-pgvector_${PPG_MAJOR_VERSION} \ percona-wal2json${PPG_MAJOR_VERSION}; \ - dnf clean all; \ - rm -rf /var/cache/dnf /var/cache/yum /data/db && mkdir -p /data/db /docker-entrypoint-initdb.d; \ - chown -R 1001:0 /data/db docker-entrypoint-initdb.d + microdnf clean all; \ + rm -rf /var/cache/dnf /var/cache/yum $PGDATA && mkdir -p $PGDATA /docker-entrypoint-initdb.d; \ + chown -R 1001:0 $PGDATA docker-entrypoint-initdb.d RUN set -ex; \ sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/pgsql-${PPG_MAJOR_VERSION}/share/postgresql.conf.sample; \