From 32cdfa2969ac844e238e17ee6a3f73f7edb9993e Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 20 Jan 2021 13:17:21 +0000 Subject: [PATCH] Include PostgreSQL 13 utilities in the container. Fixes #6162 --- Dockerfile | 20 +++++++++++++------- docs/en_US/container_deployment.rst | 1 + docs/en_US/release_notes_4_30.rst | 1 + pkg/docker/entrypoint.sh | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe92f8d93..a580e3057 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # and clean up the web/ source code ######################################################################### -FROM node:12-alpine3.11 AS app-builder +FROM node:14-alpine3.12 AS app-builder RUN apk add --no-cache \ autoconf \ @@ -64,7 +64,7 @@ RUN npm install && \ # Now, create a documentation build container for the Sphinx docs ######################################################################### -FROM python:3.8-alpine3.11 as docs-builder +FROM python:3.9-alpine3.12 as docs-builder # Install only dependencies absolutely required for documentation building RUN apk add --no-cache \ @@ -101,6 +101,7 @@ FROM postgres:9.6-alpine as pg96-builder FROM postgres:10-alpine as pg10-builder FROM postgres:11-alpine as pg11-builder FROM postgres:12-alpine as pg12-builder +FROM postgres:13-alpine as pg13-builder FROM alpine:3.11 as tool-builder @@ -130,11 +131,16 @@ COPY --from=pg12-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-12/ COPY --from=pg12-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-12/ COPY --from=pg12-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-12/ +COPY --from=pg13-builder /usr/local/bin/pg_dump /usr/local/pgsql/pgsql-13/ +COPY --from=pg13-builder /usr/local/bin/pg_dumpall /usr/local/pgsql/pgsql-13/ +COPY --from=pg13-builder /usr/local/bin/pg_restore /usr/local/pgsql/pgsql-13/ +COPY --from=pg13-builder /usr/local/bin/psql /usr/local/pgsql/pgsql-13/ + ######################################################################### # Assemble everything into the final container. ######################################################################### -FROM python:3.8-alpine3.11 +FROM python:3.9-alpine3.12 COPY --from=tool-builder /usr/local/pgsql /usr/local/ @@ -175,9 +181,9 @@ RUN apk add --no-cache --virtual \ apk del --no-cache build-deps && \ echo "pgadmin ALL = NOPASSWD: /usr/sbin/postfix start" > /etc/sudoers.d/postfix -# We need the v12 libpq, which is only in the 'edge' build of Alpine at present -COPY --from=pg12-builder /usr/local/lib/libpq.so.5.12 /usr/lib/ -RUN ln -sf /usr/lib/libpq.so.5.12 /usr/lib/libpq.so.5 +# We need the v13 libpq +COPY --from=pg13-builder /usr/local/lib/libpq.so.5.13 /usr/lib/ +RUN ln -sf /usr/lib/libpq.so.5.13 /usr/lib/libpq.so.5 # Copy the runner script COPY pkg/docker/run_pgadmin.py /pgadmin4 @@ -195,7 +201,7 @@ RUN groupadd -g 5050 pgadmin && \ chown pgadmin:pgadmin /var/log/pgadmin && \ touch /pgadmin4/config_distro.py && \ chown pgadmin:pgadmin /pgadmin4/config_distro.py && \ - setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3.8 + setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/python3.9 USER pgadmin # Finish up diff --git a/docs/en_US/container_deployment.rst b/docs/en_US/container_deployment.rst index 6456ef7e2..5d869852c 100644 --- a/docs/en_US/container_deployment.rst +++ b/docs/en_US/container_deployment.rst @@ -22,6 +22,7 @@ server: * PostgreSQL 10: */usr/local/pgsql-10* * PostgreSQL 11: */usr/local/pgsql-11* * PostgreSQL 12: */usr/local/pgsql-12* +* PostgreSQL 13: */usr/local/pgsql-13* The most recent version of the utilities is used by default; this may be changed in the :ref:`preferences`. diff --git a/docs/en_US/release_notes_4_30.rst b/docs/en_US/release_notes_4_30.rst index d3bb80b44..8a0d73ce0 100644 --- a/docs/en_US/release_notes_4_30.rst +++ b/docs/en_US/release_notes_4_30.rst @@ -19,6 +19,7 @@ Housekeeping | `Issue #5338 `_ - Improve code coverage and API test cases for pgAgent. | `Issue #6052 `_ - Added connected pgAdmin user and connection name in the log file. | `Issue #6079 `_ - Updated mimetype from 'text/javascript' to 'application/javascript' as 'text/javascript' is obsolete. +| `Issue #6162 `_ - Include PostgreSQL 13 utilities in the container. Bug fixes ********* diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh index 2a2bc5c75..2b33bcfab 100755 --- a/pkg/docker/entrypoint.sh +++ b/pkg/docker/entrypoint.sh @@ -8,7 +8,7 @@ if [ `wc -m /pgadmin4/config_distro.py | awk '{ print $1 }'` = "0" ]; then cat << EOF > /pgadmin4/config_distro.py HELP_PATH = '../../docs' DEFAULT_BINARY_PATHS = { - 'pg': '/usr/local/pgsql-12' + 'pg': '/usr/local/pgsql-13' } EOF