-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Update postgres #19955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update postgres #19955
+15
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes: - docker-library/postgres@304578a: Update latest to 18 - docker-library/postgres@22ca5c8: Update 18 to 18.0, trixie 18.0-1.pgdg13+3, bookworm 18.0-1.pgdg12+3 - docker-library/postgres@87e6f65: Update 17 to trixie 17.6-2.pgdg13+1, bookworm 17.6-2.pgdg12+1
Diff for 34ee333:diff --git a/_bashbrew-cat b/_bashbrew-cat
index 660440c..e0985ae 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -81,42 +81,42 @@ Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
Directory: 16/bookworm
-Tags: 17.6, 17, latest, 17.6-trixie, 17-trixie, trixie
+Tags: 17.6, 17, 17.6-trixie, 17-trixie
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 87e6f65859a53d10c5170a587def1bfc882d3830
Directory: 17/trixie
-Tags: 17.6-alpine3.21, 17-alpine3.21, alpine3.21
+Tags: 17.6-alpine3.21, 17-alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
Directory: 17/alpine3.21
-Tags: 17.6-alpine3.22, 17-alpine3.22, alpine3.22, 17.6-alpine, 17-alpine, alpine
+Tags: 17.6-alpine3.22, 17-alpine3.22, 17.6-alpine, 17-alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
Directory: 17/alpine3.22
-Tags: 17.6-bookworm, 17-bookworm, bookworm
+Tags: 17.6-bookworm, 17-bookworm
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 87e6f65859a53d10c5170a587def1bfc882d3830
Directory: 17/bookworm
-Tags: 18rc1, 18rc1-trixie
+Tags: 18.0, 18, latest, 18.0-trixie, 18-trixie, trixie
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 22ca5c8d8e4b37bece4d38dbce1a060583b5308a
Directory: 18/trixie
-Tags: 18rc1-alpine3.21
+Tags: 18.0-alpine3.21, 18-alpine3.21, alpine3.21
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 22ca5c8d8e4b37bece4d38dbce1a060583b5308a
Directory: 18/alpine3.21
-Tags: 18rc1-alpine3.22, 18rc1-alpine
+Tags: 18.0-alpine3.22, 18-alpine3.22, alpine3.22, 18.0-alpine, 18-alpine, alpine
Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 22ca5c8d8e4b37bece4d38dbce1a060583b5308a
Directory: 18/alpine3.22
-Tags: 18rc1-bookworm
+Tags: 18.0-bookworm, 18-bookworm, bookworm
Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: a2433755c76d294477c85945d68944f8cdb7cf4b
+GitCommit: 22ca5c8d8e4b37bece4d38dbce1a060583b5308a
Directory: 18/bookworm
diff --git a/_bashbrew-list b/_bashbrew-list
index 8dc1b73..7b32db9 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -58,12 +58,18 @@ postgres:17.6-alpine3.21
postgres:17.6-alpine3.22
postgres:17.6-bookworm
postgres:17.6-trixie
-postgres:18rc1
-postgres:18rc1-alpine
-postgres:18rc1-alpine3.21
-postgres:18rc1-alpine3.22
-postgres:18rc1-bookworm
-postgres:18rc1-trixie
+postgres:18
+postgres:18-alpine
+postgres:18-alpine3.21
+postgres:18-alpine3.22
+postgres:18-bookworm
+postgres:18-trixie
+postgres:18.0
+postgres:18.0-alpine
+postgres:18.0-alpine3.21
+postgres:18.0-alpine3.22
+postgres:18.0-bookworm
+postgres:18.0-trixie
postgres:alpine
postgres:alpine3.21
postgres:alpine3.22
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index 7c4d1ec..8b5842f 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -14,10 +14,10 @@ postgres:16-alpine
postgres:16-alpine3.21
postgres:16-bookworm
postgres:16-trixie
-postgres:18rc1-alpine
-postgres:18rc1-alpine3.21
-postgres:18rc1-bookworm
-postgres:18rc1-trixie
+postgres:17-alpine
+postgres:17-alpine3.21
+postgres:17-bookworm
+postgres:17-trixie
postgres:alpine
postgres:alpine3.21
postgres:bookworm
diff --git a/postgres_alpine/Dockerfile b/postgres_17-alpine/Dockerfile
similarity index 100%
copy from postgres_alpine/Dockerfile
copy to postgres_17-alpine/Dockerfile
diff --git a/postgres_18rc1-alpine/docker-ensure-initdb.sh b/postgres_17-alpine/docker-ensure-initdb.sh
similarity index 100%
rename from postgres_18rc1-alpine/docker-ensure-initdb.sh
rename to postgres_17-alpine/docker-ensure-initdb.sh
diff --git a/postgres_18rc1-alpine/docker-entrypoint.sh b/postgres_17-alpine/docker-entrypoint.sh
similarity index 100%
rename from postgres_18rc1-alpine/docker-entrypoint.sh
rename to postgres_17-alpine/docker-entrypoint.sh
diff --git a/postgres_alpine3.21/Dockerfile b/postgres_17-alpine3.21/Dockerfile
similarity index 100%
copy from postgres_alpine3.21/Dockerfile
copy to postgres_17-alpine3.21/Dockerfile
diff --git a/postgres_18rc1-alpine3.21/docker-ensure-initdb.sh b/postgres_17-alpine3.21/docker-ensure-initdb.sh
similarity index 100%
rename from postgres_18rc1-alpine3.21/docker-ensure-initdb.sh
rename to postgres_17-alpine3.21/docker-ensure-initdb.sh
diff --git a/postgres_18rc1-alpine3.21/docker-entrypoint.sh b/postgres_17-alpine3.21/docker-entrypoint.sh
similarity index 100%
rename from postgres_18rc1-alpine3.21/docker-entrypoint.sh
rename to postgres_17-alpine3.21/docker-entrypoint.sh
diff --git a/postgres_bookworm/Dockerfile b/postgres_17-bookworm/Dockerfile
similarity index 99%
copy from postgres_bookworm/Dockerfile
copy to postgres_17-bookworm/Dockerfile
index d02126a..181d6bd 100644
--- a/postgres_bookworm/Dockerfile
+++ b/postgres_17-bookworm/Dockerfile
@@ -89,7 +89,7 @@ RUN set -ex; \
ENV PG_MAJOR 17
ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
-ENV PG_VERSION 17.6-1.pgdg12+1
+ENV PG_VERSION 17.6-2.pgdg12+1
RUN set -ex; \
\
diff --git a/postgres_18rc1-bookworm/docker-ensure-initdb.sh b/postgres_17-bookworm/docker-ensure-initdb.sh
similarity index 100%
rename from postgres_18rc1-bookworm/docker-ensure-initdb.sh
rename to postgres_17-bookworm/docker-ensure-initdb.sh
diff --git a/postgres_18rc1-bookworm/docker-entrypoint.sh b/postgres_17-bookworm/docker-entrypoint.sh
similarity index 100%
rename from postgres_18rc1-bookworm/docker-entrypoint.sh
rename to postgres_17-bookworm/docker-entrypoint.sh
diff --git a/postgres_trixie/Dockerfile b/postgres_17-trixie/Dockerfile
similarity index 99%
copy from postgres_trixie/Dockerfile
copy to postgres_17-trixie/Dockerfile
index d926fdc..841fb99 100644
--- a/postgres_trixie/Dockerfile
+++ b/postgres_17-trixie/Dockerfile
@@ -89,7 +89,7 @@ RUN set -ex; \
ENV PG_MAJOR 17
ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
-ENV PG_VERSION 17.6-1.pgdg13+1
+ENV PG_VERSION 17.6-2.pgdg13+1
RUN set -ex; \
\
diff --git a/postgres_18rc1-trixie/docker-ensure-initdb.sh b/postgres_17-trixie/docker-ensure-initdb.sh
similarity index 100%
rename from postgres_18rc1-trixie/docker-ensure-initdb.sh
rename to postgres_17-trixie/docker-ensure-initdb.sh
diff --git a/postgres_18rc1-trixie/docker-entrypoint.sh b/postgres_17-trixie/docker-entrypoint.sh
similarity index 100%
rename from postgres_18rc1-trixie/docker-entrypoint.sh
rename to postgres_17-trixie/docker-entrypoint.sh
diff --git a/postgres_18rc1-alpine/Dockerfile b/postgres_18rc1-alpine/Dockerfile
deleted file mode 100644
index 220dff6..0000000
diff --git a/postgres_18rc1-alpine3.21/Dockerfile b/postgres_18rc1-alpine3.21/Dockerfile
deleted file mode 100644
index e08a904..0000000
diff --git a/postgres_18rc1-bookworm/Dockerfile b/postgres_18rc1-bookworm/Dockerfile
deleted file mode 100644
index fbe86b9..0000000
diff --git a/postgres_18rc1-trixie/Dockerfile b/postgres_18rc1-trixie/Dockerfile
deleted file mode 100644
index cda2ec8..0000000
diff --git a/postgres_alpine/Dockerfile b/postgres_alpine/Dockerfile
index 475b7da..ac95f12 100644
--- a/postgres_alpine/Dockerfile
+++ b/postgres_alpine/Dockerfile
@@ -51,9 +51,9 @@ ENV LANG en_US.utf8
RUN mkdir /docker-entrypoint-initdb.d
-ENV PG_MAJOR 17
-ENV PG_VERSION 17.6
-ENV PG_SHA256 e0630a3600aea27511715563259ec2111cd5f4353a4b040e0be827f94cd7a8b0
+ENV PG_MAJOR 18
+ENV PG_VERSION 18.0
+ENV PG_SHA256 0d5b903b1e5fe361bca7aa9507519933773eb34266b1357c4e7780fdee6d6078
ENV DOCKER_PG_LLVM_DEPS \
llvm19-dev \
@@ -190,10 +190,13 @@ RUN set -eux; \
RUN install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql
-ENV PGDATA /var/lib/postgresql/data
-# this 1777 will be replaced by 0700 at runtime (allows semi-arbitrary "--user" values)
-RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
-VOLUME /var/lib/postgresql/data
+#
+# NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql
+#
+ENV PGDATA /var/lib/postgresql/18/docker
+RUN ln -svT . /var/lib/postgresql/data # https://github.com/docker-library/postgres/pull/1259#issuecomment-2215477494
+VOLUME /var/lib/postgresql
+# ("/var/lib/postgresql" is already pre-created with suitably usable permissions above)
COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/
RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh
diff --git a/postgres_alpine3.21/Dockerfile b/postgres_alpine3.21/Dockerfile
index c081f8a..e6d6b47 100644
--- a/postgres_alpine3.21/Dockerfile
+++ b/postgres_alpine3.21/Dockerfile
@@ -51,9 +51,9 @@ ENV LANG en_US.utf8
RUN mkdir /docker-entrypoint-initdb.d
-ENV PG_MAJOR 17
-ENV PG_VERSION 17.6
-ENV PG_SHA256 e0630a3600aea27511715563259ec2111cd5f4353a4b040e0be827f94cd7a8b0
+ENV PG_MAJOR 18
+ENV PG_VERSION 18.0
+ENV PG_SHA256 0d5b903b1e5fe361bca7aa9507519933773eb34266b1357c4e7780fdee6d6078
ENV DOCKER_PG_LLVM_DEPS \
llvm19-dev \
@@ -190,10 +190,13 @@ RUN set -eux; \
RUN install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql
-ENV PGDATA /var/lib/postgresql/data
-# this 1777 will be replaced by 0700 at runtime (allows semi-arbitrary "--user" values)
-RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
-VOLUME /var/lib/postgresql/data
+#
+# NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql
+#
+ENV PGDATA /var/lib/postgresql/18/docker
+RUN ln -svT . /var/lib/postgresql/data # https://github.com/docker-library/postgres/pull/1259#issuecomment-2215477494
+VOLUME /var/lib/postgresql
+# ("/var/lib/postgresql" is already pre-created with suitably usable permissions above)
COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/
RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh
diff --git a/postgres_bookworm/Dockerfile b/postgres_bookworm/Dockerfile
index d02126a..ba1bbe9 100644
--- a/postgres_bookworm/Dockerfile
+++ b/postgres_bookworm/Dockerfile
@@ -86,10 +86,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"
-ENV PG_MAJOR 17
+ENV PG_MAJOR 18
ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
-ENV PG_VERSION 17.6-1.pgdg12+1
+ENV PG_VERSION 18.0-1.pgdg12+3
RUN set -ex; \
\
@@ -157,6 +157,10 @@ RUN set -ex; \
apt-get install -y --no-install-recommends \
"postgresql-$PG_MAJOR=$PG_VERSION" \
; \
+# https://github.com/docker-library/postgres/pull/1344#issuecomment-2936578203 (JIT is a separate package in 18+, but only supported for a subset of architectures)
+ if apt-get install -s "postgresql-$PG_MAJOR-jit" > /dev/null 2>&1; then \
+ apt-get install -y --no-install-recommends "postgresql-$PG_MAJOR-jit=$PG_VERSION"; \
+ fi; \
\
rm -rf /var/lib/apt/lists/*; \
\
@@ -181,10 +185,13 @@ RUN set -eux; \
RUN install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql
-ENV PGDATA /var/lib/postgresql/data
-# this 1777 will be replaced by 0700 at runtime (allows semi-arbitrary "--user" values)
-RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
-VOLUME /var/lib/postgresql/data
+#
+# NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql
+#
+ENV PGDATA /var/lib/postgresql/18/docker
+RUN ln -svT . /var/lib/postgresql/data # https://github.com/docker-library/postgres/pull/1259#issuecomment-2215477494
+VOLUME /var/lib/postgresql
+# ("/var/lib/postgresql" is already pre-created with suitably usable permissions above)
COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/
RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh
diff --git a/postgres_trixie/Dockerfile b/postgres_trixie/Dockerfile
index d926fdc..7c5ef69 100644
--- a/postgres_trixie/Dockerfile
+++ b/postgres_trixie/Dockerfile
@@ -86,10 +86,10 @@ RUN set -ex; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"
-ENV PG_MAJOR 17
+ENV PG_MAJOR 18
ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin
-ENV PG_VERSION 17.6-1.pgdg13+1
+ENV PG_VERSION 18.0-1.pgdg13+3
RUN set -ex; \
\
@@ -157,6 +157,10 @@ RUN set -ex; \
apt-get install -y --no-install-recommends \
"postgresql-$PG_MAJOR=$PG_VERSION" \
; \
+# https://github.com/docker-library/postgres/pull/1344#issuecomment-2936578203 (JIT is a separate package in 18+, but only supported for a subset of architectures)
+ if apt-get install -s "postgresql-$PG_MAJOR-jit" > /dev/null 2>&1; then \
+ apt-get install -y --no-install-recommends "postgresql-$PG_MAJOR-jit=$PG_VERSION"; \
+ fi; \
\
rm -rf /var/lib/apt/lists/*; \
\
@@ -181,10 +185,13 @@ RUN set -eux; \
RUN install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql
-ENV PGDATA /var/lib/postgresql/data
-# this 1777 will be replaced by 0700 at runtime (allows semi-arbitrary "--user" values)
-RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
-VOLUME /var/lib/postgresql/data
+#
+# NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql
+#
+ENV PGDATA /var/lib/postgresql/18/docker
+RUN ln -svT . /var/lib/postgresql/data # https://github.com/docker-library/postgres/pull/1259#issuecomment-2215477494
+VOLUME /var/lib/postgresql
+# ("/var/lib/postgresql" is already pre-created with suitably usable permissions above)
COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/
RUN ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.shRelevant Maintainers: |
Member
Author
-ENV PGDATA /var/lib/postgresql/data
-# this 1777 will be replaced by 0700 at runtime (allows semi-arbitrary "--user" values)
-RUN install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA"
-VOLUME /var/lib/postgresql/data
+#
+# NOTE: in 18+, PGDATA has changed to match the pg_ctlcluster standard directory structure, and the VOLUME has moved from /var/lib/postgresql/data to /var/lib/postgresql
+#
+ENV PGDATA /var/lib/postgresql/18/docker
+RUN ln -svT . /var/lib/postgresql/data # https://github.com/docker-library/postgres/pull/1259#issuecomment-2215477494
+VOLUME /var/lib/postgresql
+# ("/var/lib/postgresql" is already pre-created with suitably usable permissions above)(to re-iterate) |
This was referenced Sep 25, 2025
Member
Author
|
Filed docker-library/docs#2624 to update the docs to be slightly more focused on 18+, but I don't think that needs to block this (the changes are fairly minor and the docs are already pretty explicit about 18+). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important Note
This (18+) includes docker-library/postgres#1259, which changes the default value of
PGDATAto/var/lib/postgresql/MAJOR/docker(in the case of this version in specific,/var/lib/postgresql/18/docker), and the volume to/var/lib/postgresql.Changes: