Fixed PostgreSQL 17 on Ubuntu images

This commit is contained in:
Alexey Pustovalov
2025-07-15 15:34:59 +09:00
parent 609866c700
commit 3bc102be60
4 changed files with 80 additions and 4 deletions

View File

@ -53,4 +53,23 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \ DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \ --no-install-recommends install \
${INSTALL_PKGS} gpg \
dirmngr \
gpg-agent && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://apt.postgresql.org/pub/repos/apt $DISTRIB_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgresql.gpg && \
gpgconf --kill all && \
rm -rf "$GNUPGHOME" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
gpg \
dirmngr \
gpg-agent

View File

@ -70,15 +70,34 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
libssh-4 \ libssh-4 \
libssl3t64 \ libssl3t64 \
libxml2 \ libxml2 \
postgresql-client \ postgresql-client-17 \
snmp-mibs-downloader \ snmp-mibs-downloader \
gzip \ gzip \
unixodbc \ unixodbc \
zlib1g" && \ zlib1g" && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
gpg \
dirmngr \
gpg-agent && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://apt.postgresql.org/pub/repos/apt $DISTRIB_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgresql.gpg && \
gpgconf --kill all && \
rm -rf "$GNUPGHOME" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \ DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \ --no-install-recommends install \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
gpg \
dirmngr \
gpg-agent && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -52,14 +52,33 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.3-mbstring \ php8.3-mbstring \
php8.3-xml \ php8.3-xml \
php8.3-pgsql \ php8.3-pgsql \
postgresql-client \ postgresql-client-17 \
supervisor" && \ supervisor" && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
gpg \
dirmngr \
gpg-agent && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://apt.postgresql.org/pub/repos/apt $DISTRIB_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgresql.gpg && \
gpgconf --kill all && \
rm -rf "$GNUPGHOME" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \ DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \ -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \ -o Dpkg::Options::="--force-confold" \
--no-install-recommends install \ --no-install-recommends install \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
gpg \
dirmngr \
gpg-agent && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \

View File

@ -52,14 +52,33 @@ RUN --mount=type=cache,target=/var/cache/apt/,sharing=locked \
php8.3-mbstring \ php8.3-mbstring \
php8.3-xml \ php8.3-xml \
php8.3-pgsql \ php8.3-pgsql \
postgresql-client \ postgresql-client-17 \
supervisor" && \ supervisor" && \
apt-get -y update && \ apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
--no-install-recommends install \
gpg \
dirmngr \
gpg-agent && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://apt.postgresql.org/pub/repos/apt $DISTRIB_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
key='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' && \
export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" && \
gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/postgresql.gpg && \
gpgconf --kill all && \
rm -rf "$GNUPGHOME" && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y \ DEBIAN_FRONTEND=noninteractive apt-get -y \
-o Dpkg::Options::="--force-confdef" \ -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \ -o Dpkg::Options::="--force-confold" \
--no-install-recommends install \ --no-install-recommends install \
${INSTALL_PKGS} && \ ${INSTALL_PKGS} && \
DEBIAN_FRONTEND=noninteractive apt-get -y \
purge \
gpg \
dirmngr \
gpg-agent && \
groupadd \ groupadd \
--system \ --system \
--gid 1995 \ --gid 1995 \