2
2
# If you are using "physical" mode, please check the glibc version in your production database system to avoid potential index corruption.
3
3
# You should have the same version of glibc as in your Docker image.
4
4
5
- ARG PG_SERVER_VERSION=16
5
+ ARG PG_SERVER_VERSION=17
6
6
7
7
# Build the extended image
8
8
FROM postgres:${PG_SERVER_VERSION}-bookworm
9
9
LABEL maintainer="postgres.ai"
10
10
11
11
ARG PG_SERVER_VERSION
12
- ENV PG_SERVER_VERSION=${PG_SERVER_VERSION:-16 }
12
+ ENV PG_SERVER_VERSION=${PG_SERVER_VERSION:-17 }
13
13
14
14
ARG PG_UNIX_SOCKET_DIR
15
15
ENV PG_UNIX_SOCKET_DIR=${PG_UNIX_SOCKET_DIR:-"/var/run/postgresql" }
@@ -18,10 +18,10 @@ ARG PG_SERVER_PORT
18
18
ENV PG_SERVER_PORT=${PG_SERVER_PORT:-5432}
19
19
20
20
ARG WALG_VERSION
21
- ENV WALG_VERSION=${WALG_VERSION:-3.0.5 }
21
+ ENV WALG_VERSION=${WALG_VERSION:-3.0.7 }
22
22
23
23
ARG PG_TIMETABLE_VERSION
24
- ENV PG_TIMETABLE_VERSION=${PG_TIMETABLE_VERSION:-5.11 .0}
24
+ ENV PG_TIMETABLE_VERSION=${PG_TIMETABLE_VERSION:-5.13 .0}
25
25
26
26
ARG LOGERRORS_VERSION
27
27
ENV LOGERRORS_VERSION=${LOGERRORS_VERSION:-2.1.3}
@@ -44,10 +44,6 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
44
44
&& apt-get install --no-install-recommends -y postgresql-server-dev-${PG_SERVER_VERSION} \
45
45
# plpython3 (procedural language implementation for Python 3.x)
46
46
&& apt-get install --no-install-recommends -y postgresql-plpython3-${PG_SERVER_VERSION} \
47
- # amcheck extension; not included in contrib for Postgres 9.6
48
- && if [ "${PG_SERVER_VERSION}" = "9.6" ]; then \
49
- apt-get install --no-install-recommends -y postgresql-9.6-amcheck; \
50
- fi \
51
47
# pg_repack extension
52
48
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-repack \
53
49
# hypopg extension
@@ -69,10 +65,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
69
65
# powa extension
70
66
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-powa \
71
67
# pg_auth_mon extension
72
- && if [ "${PG_SERVER_VERSION}" = "9.6" ]; then \
73
- cd /tmp && git clone --branch v1.0 --single-branch https://github.com/RafiaSabih/pg_auth_mon.git \
74
- && cd pg_auth_mon && USE_PGXS=1 make && USE_PGXS=1 make install; \
75
- elif [ $(echo "$PG_SERVER_VERSION > 10" | /usr/bin/bc) = "1" ]; then \
68
+ && if [ $(echo "$PG_SERVER_VERSION > 10" | /usr/bin/bc) = "1" ]; then \
76
69
cd /tmp && git clone --branch v3.0 --single-branch https://github.com/RafiaSabih/pg_auth_mon.git \
77
70
&& cd pg_auth_mon && USE_PGXS=1 make && USE_PGXS=1 make install; \
78
71
fi \
@@ -100,10 +93,8 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
100
93
# hll extension
101
94
&& apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}" -hll \
102
95
# topn extension
103
- && if [ $(echo "$PG_SERVER_VERSION > 9.6" | /usr/bin/bc) = "1" ]; then \
104
- curl -s https://install.citusdata.com/community/deb.sh | bash \
105
- && apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}" -topn; \
106
- fi \
96
+ && curl -s https://install.citusdata.com/community/deb.sh | bash \
97
+ && apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}" -topn \
107
98
# pg_timetable extension
108
99
&& wget https://github.com/cybertec-postgresql/pg_timetable/releases/download/v"${PG_TIMETABLE_VERSION}" /pg_timetable_Linux_x86_64.deb \
109
100
&& dpkg -i pg_timetable_Linux_x86_64.deb \
@@ -118,17 +109,11 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
118
109
cd /tmp && git clone --branch v${PG_CRON_VERSION} --single-branch https://github.com/citusdata/pg_cron.git \
119
110
&& cd pg_cron \
120
111
&& make && make install; \
121
- elif [ $(echo "$PG_SERVER_VERSION == 9.6" | /usr/bin/bc) = "1" ]; then \
122
- cd /tmp && git clone --branch v1.3.1 --single-branch https://github.com/citusdata/pg_cron.git \
123
- && cd pg_cron \
124
- && make && make install; \
125
112
elif [ $(echo "$PG_SERVER_VERSION >= 16" | /usr/bin/bc) = "1" ]; then \
126
113
apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-cron; \
127
114
fi \
128
115
# postgresql_anonymizer extension
129
- && if [ $(echo "$PG_SERVER_VERSION > 9.6" | /usr/bin/bc) = "1" ]; then \
130
- pgxn install ddlx && pgxn install postgresql_anonymizer; \
131
- fi \
116
+ && pgxn install ddlx && pgxn install postgresql_anonymizer \
132
117
# pg_stat_kcache extension
133
118
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-pg-stat-kcache \
134
119
# pg_wait_sampling extension
@@ -147,16 +132,11 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
147
132
elif [ $(echo "$PG_SERVER_VERSION == 17" | /usr/bin/bc) = "1" ]; then \
148
133
cd /tmp && git clone --branch REL4_1_0 https://github.com/pgaudit/set_user.git \
149
134
&& cd set_user && make USE_PGXS=1 && make USE_PGXS=1 install; \
150
- elif [ $(echo "$PG_SERVER_VERSION == 9.6" | /usr/bin/bc) = "1" ]; then \
151
- cd /tmp && git clone --branch REL4_0_1 https://github.com/pgaudit/set_user.git \
152
- && cd set_user && make USE_PGXS=1 && make USE_PGXS=1 install; \
153
135
fi \
154
136
# logerrors extension
155
- && if [ $(echo "$PG_SERVER_VERSION > 9.6" | /usr/bin/bc) = "1" ]; then \
156
- cd /tmp && wget -O logerrors.tar.gz https://github.com/munakoiso/logerrors/archive/v${LOGERRORS_VERSION}.tar.gz \
137
+ && cd /tmp && wget -O logerrors.tar.gz https://github.com/munakoiso/logerrors/archive/v${LOGERRORS_VERSION}.tar.gz \
157
138
&& tar -xf logerrors.tar.gz && rm logerrors.tar.gz && cd logerrors-${LOGERRORS_VERSION} \
158
- && USE_PGXS=1 make && USE_PGXS=1 make install; \
159
- fi \
139
+ && USE_PGXS=1 make && USE_PGXS=1 make install \
160
140
# pgvector extension
161
141
&& if [ $(echo "$PG_SERVER_VERSION >= 11" | /usr/bin/bc) = "1" ]; then \
162
142
if [ "${PG_SERVER_VERSION}" = "11" ]; then PGVECTOR_VERSION="0.5.1" ; \
@@ -179,7 +159,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
179
159
&& tar -zxvf wal-g-pg-ubuntu-20.04-amd64.tar.gz \
180
160
&& mv wal-g-pg-ubuntu-20.04-amd64 /usr/local/bin/wal-g \
181
161
&& wal-g --version \
182
- # remove all auxilary packages to reduce final image size
162
+ # remove all auxiliary packages to reduce final image size
183
163
&& cd / && rm -rf /tmp/* && apt-get purge -y --auto-remove \
184
164
gcc make wget unzip curl libc6-dev apt-transport-https git \
185
165
postgresql-server-dev-${PG_SERVER_VERSION} pgxnclient build-essential \
0 commit comments