diff --git a/14/bookworm/Dockerfile b/14/bookworm/Dockerfile index 5847ff8334..0dbf761803 100644 --- a/14/bookworm/Dockerfile +++ b/14/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/14/trixie/Dockerfile b/14/trixie/Dockerfile index 525bca152d..24a000fc23 100644 --- a/14/trixie/Dockerfile +++ b/14/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/15/bookworm/Dockerfile b/15/bookworm/Dockerfile index c280fc9662..388c2399c7 100644 --- a/15/bookworm/Dockerfile +++ b/15/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/15/trixie/Dockerfile b/15/trixie/Dockerfile index 3e0b26d36f..13ff373abf 100644 --- a/15/trixie/Dockerfile +++ b/15/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/16/bookworm/Dockerfile b/16/bookworm/Dockerfile index e24075b6c6..b4da3a7016 100644 --- a/16/bookworm/Dockerfile +++ b/16/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/16/trixie/Dockerfile b/16/trixie/Dockerfile index 597bb69a23..476f2c74ae 100644 --- a/16/trixie/Dockerfile +++ b/16/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/17/bookworm/Dockerfile b/17/bookworm/Dockerfile index c5477ec537..153fffb21b 100644 --- a/17/bookworm/Dockerfile +++ b/17/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/17/trixie/Dockerfile b/17/trixie/Dockerfile index 73e7dc9535..df9455513c 100644 --- a/17/trixie/Dockerfile +++ b/17/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/18/bookworm/Dockerfile b/18/bookworm/Dockerfile index 6d1d381170..5cfe933bdb 100644 --- a/18/bookworm/Dockerfile +++ b/18/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/18/trixie/Dockerfile b/18/trixie/Dockerfile index a560621774..0bebdb64e6 100644 --- a/18/trixie/Dockerfile +++ b/18/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/19/bookworm/Dockerfile b/19/bookworm/Dockerfile index 5efdb8a18a..88223d0726 100644 --- a/19/bookworm/Dockerfile +++ b/19/bookworm/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/19/trixie/Dockerfile b/19/trixie/Dockerfile index 34c0311f1f..24a85d1006 100644 --- a/19/trixie/Dockerfile +++ b/19/trixie/Dockerfile @@ -24,6 +24,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index dc3924575e..72d6b86071 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -18,6 +18,12 @@ RUN set -ex; \ # (if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size) less \ ; \ +# Install tzdata-legacy on trixie and newer to maintain compatibility with +# deprecated timezones. +# https://github.com/docker-library/postgres/issues/1355 + if apt-get install -s tzdata-legacy > /dev/null 2>&1; then \ + apt-get install -y --no-install-recommends tzdata-legacy; \ + fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root