Skip to content

Commit

Permalink
postgresql dockers update
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniyPatlan committed Nov 24, 2023
1 parent a317a44 commit 962e468
Show file tree
Hide file tree
Showing 19 changed files with 1,248 additions and 35 deletions.
19 changes: 16 additions & 3 deletions percona-distribution-postgresql-11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ LABEL org.opencontainers.image.authors="[email protected]"
RUN microdnf -y update; \
microdnf -y install glibc-langpack-en

ENV PPG_VERSION 11.17-3
ENV PPG_VERSION 11.22-1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PPG_VERSION.$OS_VER"

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
Expand All @@ -23,7 +30,7 @@ RUN set -ex; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#percona-release setup -y ppg11; \
percona-release enable ppg-11.17 testing;
percona-release enable ppg-11.22 testing;

RUN set -ex; \
microdnf -y update; \
Expand Down Expand Up @@ -60,7 +67,7 @@ RUN set -ex; \
percona-postgresql-common \
percona-pg_stat_monitor11 \
percona-pg_repack11 \
percona-pgaudit \
percona-pgaudit11 \
percona-pgaudit11_set_user \
percona-wal2json11; \
microdnf clean all; \
Expand Down Expand Up @@ -89,6 +96,12 @@ RUN set -eux; \

COPY entrypoint.sh /entrypoint.sh

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown 1001:0 /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

VOLUME ["/data/db"]

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
2 changes: 2 additions & 0 deletions percona-distribution-postgresql-11/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ _main() {
echo
fi
fi
# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
./call-home.sh -f "PRODUCT_FAMILY_POSTGRESQL" -v "11.22" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS} &> /dev/null || :

exec "$@"
}
Expand Down
19 changes: 16 additions & 3 deletions percona-distribution-postgresql-12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ LABEL org.opencontainers.image.authors="[email protected]"
RUN microdnf -y update; \
microdnf -y install glibc-langpack-en

ENV PPG_VERSION 12.12-3
ENV PPG_VERSION 12.17-1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PPG_VERSION.$OS_VER"

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
Expand All @@ -23,7 +30,7 @@ RUN set -ex; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#percona-release setup -y ppg12; \
percona-release enable ppg-12.12 testing;
percona-release enable ppg-12.17 testing;

RUN set -ex; \
microdnf -y update; \
Expand Down Expand Up @@ -60,7 +67,7 @@ RUN set -ex; \
percona-postgresql-common \
percona-pg_stat_monitor12 \
percona-pg_repack12 \
percona-pgaudit \
percona-pgaudit12 \
percona-pgaudit12_set_user \
percona-wal2json12; \
microdnf clean all; \
Expand Down Expand Up @@ -89,6 +96,12 @@ RUN set -eux; \

COPY entrypoint.sh /entrypoint.sh

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown 1001:0 /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

VOLUME ["/data/db"]

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
2 changes: 2 additions & 0 deletions percona-distribution-postgresql-12/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ _main() {
echo
fi
fi
# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
./call-home.sh -f "PRODUCT_FAMILY_POSTGRESQL" -v "12.17" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS} &> /dev/null || :

exec "$@"
}
Expand Down
19 changes: 16 additions & 3 deletions percona-distribution-postgresql-13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ LABEL org.opencontainers.image.authors="[email protected]"
RUN microdnf -y update; \
microdnf -y install glibc-langpack-en

ENV PPG_VERSION 13.8-3
ENV PPG_VERSION 13.13-1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PPG_VERSION.$OS_VER"

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
Expand All @@ -23,7 +30,7 @@ RUN set -ex; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#percona-release setup -y ppg13; \
percona-release enable ppg-13.8 testing;
percona-release enable ppg-13.13 testing;

RUN set -ex; \
microdnf -y update; \
Expand Down Expand Up @@ -60,7 +67,7 @@ RUN set -ex; \
percona-postgresql-common \
percona-pg_stat_monitor13 \
percona-pg_repack13 \
percona-pgaudit \
percona-pgaudit13 \
percona-pgaudit13_set_user \
percona-wal2json13; \
microdnf clean all; \
Expand Down Expand Up @@ -89,6 +96,12 @@ RUN set -eux; \

COPY entrypoint.sh /entrypoint.sh

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown 1001:0 /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

VOLUME ["/data/db"]

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
2 changes: 2 additions & 0 deletions percona-distribution-postgresql-13/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ _main() {
echo
fi
fi
# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
./call-home.sh -f "PRODUCT_FAMILY_POSTGRESQL" -v "13.13" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS} &> /dev/null || :

exec "$@"
}
Expand Down
19 changes: 16 additions & 3 deletions percona-distribution-postgresql-14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ LABEL org.opencontainers.image.authors="[email protected]"
RUN microdnf -y update; \
microdnf -y install glibc-langpack-en

ENV PPG_VERSION 14.5-3
ENV PPG_VERSION 14.10-1
ENV OS_VER el8
ENV FULL_PERCONA_VERSION "$PPG_VERSION.$OS_VER"

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
Expand All @@ -23,7 +30,7 @@ RUN set -ex; \
rm -rf "$GNUPGHOME" /tmp/percona-release.rpm; \
rpm --import /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY; \
#percona-release setup -y ppg14; \
percona-release enable ppg-14.5 testing;
percona-release enable ppg-14.10 testing;

RUN set -ex; \
microdnf -y update; \
Expand Down Expand Up @@ -60,7 +67,7 @@ RUN set -ex; \
percona-postgresql-common \
percona-pg_stat_monitor14 \
percona-pg_repack14 \
percona-pgaudit \
percona-pgaudit14 \
percona-pgaudit14_set_user \
percona-wal2json14; \
microdnf clean all; \
Expand Down Expand Up @@ -89,6 +96,12 @@ RUN set -eux; \

COPY entrypoint.sh /entrypoint.sh

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown 1001:0 /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

VOLUME ["/data/db"]

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
2 changes: 2 additions & 0 deletions percona-distribution-postgresql-14/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ _main() {
echo
fi
fi
# PERCONA_TELEMETRY_DISABLE is handled at the very beginning of call-home.sh
./call-home.sh -f "PRODUCT_FAMILY_POSTGRESQL" -v "14.10" -d "DOCKER" ${CALL_HOME_OPTIONAL_PARAMS} &> /dev/null || :

exec "$@"
}
Expand Down
47 changes: 27 additions & 20 deletions percona-distribution-postgresql-15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
FROM redhat/ubi8-minimal
FROM oraclelinux:9

LABEL org.opencontainers.image.authors="[email protected]"

RUN microdnf -y update; \
microdnf -y install glibc-langpack-en
RUN dnf -y update; \
dnf -y install glibc-langpack-en

ENV PPG_VERSION 15.0-1
ENV OS_VER el8
ENV PPG_VERSION 15.5-1
ENV OS_VER el9
ENV FULL_PERCONA_VERSION "$PPG_VERSION.$OS_VER"

# Do not report during Docker image creation.
# Note that doing so, would create telemetry config file
# which would prevent reporting when new container is started.
# If we want to track Docker image creation as well,
# remove telemetry config file after installing packages!
ARG PERCONA_TELEMETRY_DISABLE=1

# check repository package signature in secure way
RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A 99DB70FAE1D7CE227FB6488205B555B38483C65D; \
gpg --batch --export --armor 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A > ${GNUPGHOME}/RPM-GPG-KEY-Percona; \
gpg --batch --export --armor 99DB70FAE1D7CE227FB6488205B555B38483C65D > ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
rpmkeys --import ${GNUPGHOME}/RPM-GPG-KEY-Percona ${GNUPGHOME}/RPM-GPG-KEY-centosofficial; \
microdnf install -y findutils; \
dnf 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 ppg15; \
percona-release enable ppg-15.0 testing;
percona-release enable ppg-15.5 testing;

RUN set -ex; \
microdnf -y update; \
microdnf -y install \
dnf -y update; \
dnf -y install \
bind-utils \
gettext \
hostname \
Expand All @@ -36,34 +43,28 @@ RUN set -ex; \
bzip2 \
lz4 \
procps-ng; \
microdnf -y install \
dnf -y install \
nss_wrapper \
shadow-utils \
libpq \
libedit; \
microdnf clean all
dnf clean all

# the numeric UID is needed for OpenShift
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

RUN set -ex; \
microdnf install -y \
dnf install -y \
percona-postgresql15-server-${FULL_PERCONA_VERSION} \
percona-postgresql15-contrib-${FULL_PERCONA_VERSION} \
percona-postgresql-common \
percona-pg_stat_monitor15 \
percona-pg_repack15 \
percona-pgaudit \
percona-pgaudit15 \
percona-pgaudit15_set_user \
percona-wal2json15; \
microdnf clean all; \
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

Expand All @@ -89,6 +90,12 @@ RUN set -eux; \

COPY entrypoint.sh /entrypoint.sh

ADD https://raw.githubusercontent.com/Percona-Lab/telemetry-agent/phase-0/call-home.sh /call-home.sh
RUN chmod a+rx call-home.sh
RUN mkdir -p /usr/local/percona
RUN chown 1001:0 /usr/local/percona
ENV CALL_HOME_OPTIONAL_PARAMS=" -s ${OS_VER}"

VOLUME ["/data/db"]

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
Loading

0 comments on commit 962e468

Please sign in to comment.