From 6b2d9f0d5dde36d634d1bbcbd27a0b2ed7054f3c Mon Sep 17 00:00:00 2001 From: Daniel Trebbien Date: Sun, 22 Jul 2018 12:16:31 -0400 Subject: [PATCH 1/2] Build with the ICU collation provider This builds PostgreSQL with the ICU collation provider: https://www.postgresql.org/docs/10/static/collation.html --- 10/alpine/Dockerfile | 2 ++ 11/alpine/Dockerfile | 2 ++ Dockerfile-alpine.template | 2 ++ 3 files changed, 6 insertions(+) diff --git a/10/alpine/Dockerfile b/10/alpine/Dockerfile index 406895329e..beeac87658 100644 --- a/10/alpine/Dockerfile +++ b/10/alpine/Dockerfile @@ -66,6 +66,7 @@ RUN set -ex \ # tcl-dev \ util-linux-dev \ zlib-dev \ + icu-dev \ \ && cd /usr/src/postgresql \ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian) @@ -108,6 +109,7 @@ RUN set -ex \ --with-openssl \ --with-libxml \ --with-libxslt \ + --with-icu \ && make -j "$(nproc)" world \ && make install-world \ && make -C contrib install \ diff --git a/11/alpine/Dockerfile b/11/alpine/Dockerfile index 4c0c17b0f6..52e3cf5eff 100644 --- a/11/alpine/Dockerfile +++ b/11/alpine/Dockerfile @@ -66,6 +66,7 @@ RUN set -ex \ # tcl-dev \ util-linux-dev \ zlib-dev \ + icu-dev \ \ && cd /usr/src/postgresql \ # update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian) @@ -108,6 +109,7 @@ RUN set -ex \ --with-openssl \ --with-libxml \ --with-libxslt \ + --with-icu \ && make -j "$(nproc)" world \ && make install-world \ && make -C contrib install \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 32bbb31ac7..170316abc6 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -67,6 +67,7 @@ RUN set -ex \ # tcl-dev \ util-linux-dev \ zlib-dev \ + icu-dev \ \ %%INSTALL_OSSP_UUID%% && cd /usr/src/postgresql \ @@ -110,6 +111,7 @@ RUN set -ex \ --with-openssl \ --with-libxml \ --with-libxslt \ + --with-icu \ && make -j "$(nproc)" world \ && make install-world \ && make -C contrib install \ From 498a243ce39c7fa5b4c28b05061578239fb9cf86 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 27 Jul 2018 13:05:46 -0700 Subject: [PATCH 2/2] Remove "ICU" from 9.x during templating --- update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update.sh b/update.sh index cfb2864623..9cadff038d 100755 --- a/update.sh +++ b/update.sh @@ -53,6 +53,8 @@ for version in "${versions[@]}"; do sed -i -e 's/WALDIR/XLOGDIR/g' \ -e 's/waldir/xlogdir/g' \ "$version/docker-entrypoint.sh" + # ICU support was introduced in PostgreSQL 10 (https://www.postgresql.org/docs/10/static/release-10.html#id-1.11.6.9.5.13) + sed -i -e '/icu/d' "$version/Dockerfile" else # postgresql-contrib-10 package does not exist, but is provided by postgresql-10 # Packages.gz: @@ -85,6 +87,8 @@ for version in "${versions[@]}"; do sed -i -e 's/WALDIR/XLOGDIR/g' \ -e 's/waldir/xlogdir/g' \ "$version/$variant/docker-entrypoint.sh" + # ICU support was introduced in PostgreSQL 10 (https://www.postgresql.org/docs/10/static/release-10.html#id-1.11.6.9.5.13) + sed -i -e '/icu/d' "$version/$variant/Dockerfile" fi # TODO remove all this when 9.3 is EOL (2018-10-01 -- from http://www.postgresql.org/support/versioning/)