Add POSTGRES_CLIENT_VERSION option

This commit is contained in:
Pavel Bychko 2023-03-04 15:53:37 +03:00
parent 6c8cb6dd85
commit db0d6f9b75
4 changed files with 7 additions and 2 deletions

View File

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

View File

@ -130,6 +130,7 @@ services:
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM} - INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS} - INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT} - INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- PG_CLIENT_VERSION=${POSTGRES_CLIENT_VERSION}
- INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON} - INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE} - INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_TAINT=${WORKSPACE_INSTALL_TAINT} - INSTALL_TAINT=${WORKSPACE_INSTALL_TAINT}
@ -246,6 +247,7 @@ services:
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT} - INSTALL_PG_CLIENT=${PHP_FPM_INSTALL_PG_CLIENT}
- PG_CLIENT_VERSION=${POSTGRES_CLIENT_VERSION}
- INSTALL_POSTGIS=${PHP_FPM_INSTALL_POSTGIS} - INSTALL_POSTGIS=${PHP_FPM_INSTALL_POSTGIS}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} - 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_PG_CLIENT=false
ARG INSTALL_POSTGIS=false ARG INSTALL_POSTGIS=false
ARG PG_CLIENT_VERSION
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
apt-get install -yqq gnupg \ 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 \ && 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 - \ && curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt-get update -yqq \ && 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 \ if [ ${INSTALL_POSTGIS} = true ]; then \
apt-get install -yqq postgis; \ apt-get install -yqq postgis; \
fi \ fi \

View File

@ -1284,6 +1284,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
USER root USER root
ARG INSTALL_PG_CLIENT=false ARG INSTALL_PG_CLIENT=false
ARG PG_CLIENT_VERSION
RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
# Install the pgsql client # Install the pgsql client
@ -1291,7 +1292,7 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ && 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 \ && 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 update \
&& apt-get -y install postgresql-client-12 \ && apt-get -y install postgresql-client-${PG_CLIENT_VERSION} \
;fi ;fi
########################################################################### ###########################################################################