Skip to content

Commit fd3e127

Browse files
ImreSamuyosifkit
authored andcommitted
add pg14 generated files created by the new ./update.sh
drop 9.5 since it was EOL in February
1 parent d01a932 commit fd3e127

File tree

7 files changed

+29
-30
lines changed

7 files changed

+29
-30
lines changed

12/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
181181
VOLUME /var/lib/postgresql/data
182182

183183
COPY docker-entrypoint.sh /usr/local/bin/
184-
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
185184
ENTRYPOINT ["docker-entrypoint.sh"]
186185

187186
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL

13/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
183183
VOLUME /var/lib/postgresql/data
184184

185185
COPY docker-entrypoint.sh /usr/local/bin/
186-
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
187186
ENTRYPOINT ["docker-entrypoint.sh"]
188187

189188
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL

9.5/Dockerfile renamed to 14/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# vim:set ft=dockerfile:
2-
FROM debian:stretch-slim
2+
FROM debian:buster-slim
33

44
RUN set -ex; \
55
if ! command -v gpg > /dev/null; then \
@@ -82,8 +82,8 @@ RUN set -ex; \
8282
rm -rf "$GNUPGHOME"; \
8383
apt-key list
8484

85-
ENV PG_MAJOR 9.5
86-
ENV PG_VERSION 9.5.25-1.pgdg90+1
85+
ENV PG_MAJOR 14
86+
ENV PG_VERSION 14~beta1-1.pgdg100+1
8787

8888
RUN set -ex; \
8989
\
@@ -92,22 +92,22 @@ RUN set -ex; \
9292
\
9393
dpkgArch="$(dpkg --print-architecture)"; \
9494
case "$dpkgArch" in \
95-
amd64 | i386 | ppc64el) \
95+
amd64 | arm64 | i386 | ppc64el) \
9696
# arches officialy built by upstream
97-
echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
97+
echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
9898
apt-get update; \
9999
;; \
100100
*) \
101101
# we're on an architecture upstream doesn't officially build for
102102
# let's build binaries from their published source packages
103-
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
103+
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
104104
\
105105
case "$PG_MAJOR" in \
106106
9.* | 10 ) ;; \
107107
*) \
108108
# https://github.com/docker-library/postgres/issues/484 (clang-6.0 required, only available in stretch-backports)
109109
# TODO remove this once we hit buster+
110-
echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/pgdg.list; \
110+
echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/pgdg.list; \
111111
;; \
112112
esac; \
113113
\
@@ -151,7 +151,6 @@ RUN set -ex; \
151151
sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf; \
152152
apt-get install -y --no-install-recommends \
153153
"postgresql-$PG_MAJOR=$PG_VERSION" \
154-
"postgresql-contrib-$PG_MAJOR=$PG_VERSION" \
155154
; \
156155
\
157156
rm -rf /var/lib/apt/lists/*; \
@@ -182,7 +181,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
182181
VOLUME /var/lib/postgresql/data
183182

184183
COPY docker-entrypoint.sh /usr/local/bin/
185-
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
186184
ENTRYPOINT ["docker-entrypoint.sh"]
187185

188186
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ ENV LANG en_US.utf8
1717

1818
RUN mkdir /docker-entrypoint-initdb.d
1919

20-
ENV PG_MAJOR 9.5
21-
ENV PG_VERSION 9.5.25
22-
ENV PG_SHA256 7628c55eb23768a2c799c018988d8f2ab48ee3d80f5e11259938f7a935f0d603
20+
ENV PG_MAJOR 14
21+
ENV PG_VERSION 14beta1
22+
ENV PG_SHA256 c490ddf325444bd1381e1691e8e96814867a10b81ef73a74dc10323f7d143052
2323

2424
RUN set -eux; \
2525
\
@@ -46,6 +46,7 @@ RUN set -eux; \
4646
libxml2-dev \
4747
libxslt-dev \
4848
linux-headers \
49+
llvm10-dev clang g++ \
4950
make \
5051
# openldap-dev \
5152
openssl-dev \
@@ -59,6 +60,7 @@ RUN set -eux; \
5960
# tcl-dev \
6061
util-linux-dev \
6162
zlib-dev \
63+
icu-dev \
6264
; \
6365
\
6466
cd /usr/src/postgresql; \
@@ -102,6 +104,8 @@ RUN set -eux; \
102104
--with-openssl \
103105
--with-libxml \
104106
--with-libxslt \
107+
--with-icu \
108+
--with-llvm \
105109
; \
106110
make -j "$(nproc)" world; \
107111
make install-world; \
@@ -142,7 +146,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
142146
VOLUME /var/lib/postgresql/data
143147

144148
COPY docker-entrypoint.sh /usr/local/bin/
145-
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
146149
ENTRYPOINT ["docker-entrypoint.sh"]
147150

148151
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ docker_create_db_directories() {
4545
chmod 775 /var/run/postgresql || :
4646

4747
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
48-
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
49-
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
48+
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
49+
mkdir -p "$POSTGRES_INITDB_WALDIR"
5050
if [ "$user" = '0' ]; then
51-
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
51+
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
5252
fi
53-
chmod 700 "$POSTGRES_INITDB_XLOGDIR"
53+
chmod 700 "$POSTGRES_INITDB_WALDIR"
5454
fi
5555

5656
# allow the container to be started with `--user`
@@ -75,8 +75,8 @@ docker_init_database_dir() {
7575
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
7676
fi
7777

78-
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
79-
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
78+
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
79+
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
8080
fi
8181

8282
eval 'initdb --username="$POSTGRES_USER" --pwfile=<(echo "$POSTGRES_PASSWORD") '"$POSTGRES_INITDB_ARGS"' "$@"'
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ docker_create_db_directories() {
4545
chmod 775 /var/run/postgresql || :
4646

4747
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
48-
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
49-
mkdir -p "$POSTGRES_INITDB_XLOGDIR"
48+
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
49+
mkdir -p "$POSTGRES_INITDB_WALDIR"
5050
if [ "$user" = '0' ]; then
51-
find "$POSTGRES_INITDB_XLOGDIR" \! -user postgres -exec chown postgres '{}' +
51+
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
5252
fi
53-
chmod 700 "$POSTGRES_INITDB_XLOGDIR"
53+
chmod 700 "$POSTGRES_INITDB_WALDIR"
5454
fi
5555

5656
# allow the container to be started with `--user`
@@ -75,8 +75,8 @@ docker_init_database_dir() {
7575
echo "postgres:x:$(id -g):" > "$NSS_WRAPPER_GROUP"
7676
fi
7777

78-
if [ -n "$POSTGRES_INITDB_XLOGDIR" ]; then
79-
set -- --xlogdir "$POSTGRES_INITDB_XLOGDIR" "$@"
78+
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
79+
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
8080
fi
8181

8282
eval 'initdb --username="$POSTGRES_USER" --pwfile=<(echo "$POSTGRES_PASSWORD") '"$POSTGRES_INITDB_ARGS"' "$@"'

update.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ versions=( "${versions[@]%/}" )
1212
defaultDebianSuite='buster-slim'
1313
declare -A debianSuite=(
1414
# https://github.com/docker-library/postgres/issues/582
15-
[9.4]='stretch-slim'
16-
[9.5]='stretch-slim'
1715
[9.6]='stretch-slim'
1816
[10]='stretch-slim'
1917
[11]='stretch-slim'
20-
[14]='bullseye-slim'
2118
)
2219
defaultAlpineVersion='3.13'
2320
declare -A alpineVersion=(
@@ -129,6 +126,9 @@ for version in "${versions[@]}"; do
129126
if [ "$majorVersion" != '13' ]; then
130127
sed -i -e '/DEBIAN_FRONTEND/d' "$version/Dockerfile"
131128
fi
129+
if [ "$majorVersion" -gt 11 ]; then
130+
sed -i '/backwards compat/d' "$version/Dockerfile"
131+
fi
132132

133133
# TODO figure out what to do with odd version numbers here, like release candidates
134134
srcVersion="${fullVersion%%-*}"

0 commit comments

Comments
 (0)