Merge pull request #3360 from abordage/add_postgres_client_version_option

Add POSTGRES_CLIENT_VERSION option
This commit is contained in:
Shao Yu-Lung (Allen) 2023-03-30 08:05:44 +08:00 committed by GitHub
commit bb215f1e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

View File

@ -462,6 +462,7 @@ MARIADB_ENTRYPOINT_INITDB=./mariadb/docker-entrypoint-initdb.d
### POSTGRES ##############################################
POSTGRES_VERSION=alpine
POSTGRES_CLIENT_VERSION=15
POSTGRES_DB=default
POSTGRES_USER=default
POSTGRES_PASSWORD=secret

View File

@ -130,6 +130,7 @@ services:
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- PG_CLIENT_VERSION=${POSTGRES_CLIENT_VERSION}
- INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_TAINT=${WORKSPACE_INSTALL_TAINT}
@ -247,6 +248,7 @@ services:
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
- PG_CLIENT_VERSION=${POSTGRES_CLIENT_VERSION}
- INSTALL_POSTGIS=${PHP_FPM_INSTALL_POSTGIS}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}

View File

@ -193,6 +193,7 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
ARG INSTALL_PG_CLIENT=false
ARG INSTALL_POSTGIS=false
ARG PG_CLIENT_VERSION
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
apt-get install -yqq gnupg \
@ -200,7 +201,7 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
&& echo "deb http://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update -yqq \
&& apt-get install -yqq postgresql-client-12 postgis; \
&& apt-get install -yqq postgresql-client-${PG_CLIENT_VERSION} postgis; \
if [ ${INSTALL_POSTGIS} = true ]; then \
apt-get install -yqq postgis; \
fi \

View File

@ -1289,6 +1289,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
USER root
ARG INSTALL_PG_CLIENT=false
ARG PG_CLIENT_VERSION
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
# Install the pgsql client
@ -1296,7 +1297,7 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
&& apt-get update \
&& apt-get -y install postgresql-client-12 \
&& apt-get -y install postgresql-client-${PG_CLIENT_VERSION} \
;fi
###########################################################################