Skip to content

Commit 27c70d8

Browse files
committed
Merge branch 'minor-update' into 'master'
Update Postgres Docker images to latest minors (17.4, 16.8, 15.12, 14.17, 13.20, 12.22) See merge request postgres-ai/custom-images!69
2 parents ba46fb8 + 639a82d commit 27c70d8

File tree

6 files changed

+29
-45
lines changed

6 files changed

+29
-45
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Storage-optimized: the size of each image is ~300-500 MiB.
1010
Use these images with Database Lab, when you need HypoPG or anything else.
1111

1212
### What's inside
13-
Available PostgreSQL versions: 9.6 (EOL), 10 (EOL), 11 (EOL), 12, 13, 14, 15, 16, 17. Extensions:
13+
Available PostgreSQL versions: 9.6 (EOL), 10 (EOL), 11 (EOL), 12(EOL), 13, 14, 15, 16, 17. Extensions:
1414
- all official ["core" contrib modules](https://www.postgresql.org/docs/current/contrib.html)
1515
- [bg_mon](https://github.com/CyberDem0n/bg_mon)
1616
- [Citus](https://github.com/citusdata/citus)
@@ -35,12 +35,6 @@ Available PostgreSQL versions: 9.6 (EOL), 10 (EOL), 11 (EOL), 12, 13, 14, 15, 16
3535
- [timescaledb](https://github.com/timescale/timescaledb)
3636
- [pgvector](https://github.com/pgvector/pgvector)
3737

38-
#### Not included in the PostgreSQL 17 image (yet)
39-
The PostgreSQL 17 image is now missing the following extensions (they will be added in the future):
40-
- powa
41-
- citus
42-
- topn
43-
4438
### How to extend
4539
- You can fork this repository and extend `Dockerfile`, then build your own images
4640
- Proposals to add more extensions to this repository are welcome https://gitlab.com/postgres-ai/custom-images/-/issues

extended-postgres/Dockerfile

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ ARG PG_SERVER_PORT
1818
ENV PG_SERVER_PORT=${PG_SERVER_PORT:-5432}
1919

2020
ARG WALG_VERSION
21-
ENV WALG_VERSION=${WALG_VERSION:-3.0.3}
21+
ENV WALG_VERSION=${WALG_VERSION:-3.0.5}
2222

2323
ARG PG_TIMETABLE_VERSION
24-
ENV PG_TIMETABLE_VERSION=${PG_TIMETABLE_VERSION:-5.9.0}
24+
ENV PG_TIMETABLE_VERSION=${PG_TIMETABLE_VERSION:-5.11.0}
2525

2626
ARG LOGERRORS_VERSION
2727
ENV LOGERRORS_VERSION=${LOGERRORS_VERSION:-2.1.3}
2828

2929
ARG PGVECTOR_VERSION
30-
ENV PGVECTOR_VERSION=${PGVECTOR_VERSION:-0.7.4}
30+
ENV PGVECTOR_VERSION=${PGVECTOR_VERSION:-0.8.0}
3131

3232
# https://gitlab.com/postgres-ai/custom-images/-/merge_requests/56
3333
ARG PG_CRON_VERSION
@@ -67,9 +67,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
6767
&& make && make install; \
6868
fi \
6969
# powa extension
70-
&& if [ $(echo "$PG_SERVER_VERSION < 17" | /usr/bin/bc) = "1" ]; then \
71-
apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-powa; \
72-
fi \
70+
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-powa \
7371
# pg_auth_mon extension
7472
&& if [ "${PG_SERVER_VERSION}" = "9.6" ]; then \
7573
cd /tmp && git clone --branch v1.0 --single-branch https://github.com/RafiaSabih/pg_auth_mon.git \
@@ -87,21 +85,22 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
8785
timescaledb-2-postgresql-${PG_SERVER_VERSION}; \
8886
fi \
8987
# citus extension
90-
&& if [ $(echo "$PG_SERVER_VERSION > 10" | /usr/bin/bc) = "1" ] && [ $(echo "$PG_SERVER_VERSION < 17" | /usr/bin/bc) = "1" ]; then \
88+
&& if [ $(echo "$PG_SERVER_VERSION > 10" | /usr/bin/bc) = "1" ]; then \
9189
if [ "${PG_SERVER_VERSION}" = "11" ]; then CITUS_VERSION="10.0"; \
9290
elif [ "${PG_SERVER_VERSION}" = "12" ]; then CITUS_VERSION="10.2"; \
9391
elif [ "${PG_SERVER_VERSION}" = "13" ]; then CITUS_VERSION="11.3"; \
9492
elif [ "${PG_SERVER_VERSION}" = "14" ]; then CITUS_VERSION="12.1"; \
95-
elif [ "${PG_SERVER_VERSION}" = "15" ]; then CITUS_VERSION="12.1"; \
96-
elif [ "${PG_SERVER_VERSION}" = "16" ]; then CITUS_VERSION="12.1"; \
93+
elif [ "${PG_SERVER_VERSION}" = "15" ]; then CITUS_VERSION="13.0"; \
94+
elif [ "${PG_SERVER_VERSION}" = "16" ]; then CITUS_VERSION="13.0"; \
95+
elif [ "${PG_SERVER_VERSION}" = "17" ]; then CITUS_VERSION="13.0"; \
9796
fi \
9897
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
9998
&& apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}"-citus-"${CITUS_VERSION}"; \
10099
fi \
101100
# hll extension
102101
&& apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}"-hll \
103102
# topn extension
104-
&& if [ $(echo "$PG_SERVER_VERSION > 9.6" | /usr/bin/bc) = "1" ] && [ $(echo "$PG_SERVER_VERSION < 17" | /usr/bin/bc) = "1" ]; then \
103+
&& if [ $(echo "$PG_SERVER_VERSION > 9.6" | /usr/bin/bc) = "1" ]; then \
105104
curl -s https://install.citusdata.com/community/deb.sh | bash \
106105
&& apt-get install --no-install-recommends -y postgresql-"${PG_SERVER_VERSION}"-topn; \
107106
fi \
@@ -131,12 +130,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
131130
pgxn install ddlx && pgxn install postgresql_anonymizer; \
132131
fi \
133132
# pg_stat_kcache extension
134-
&& if [ $(echo "$PG_SERVER_VERSION < 17" | /usr/bin/bc) = "1" ]; then \
135-
apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-pg-stat-kcache; \
136-
elif [ $(echo "$PG_SERVER_VERSION == 17" | /usr/bin/bc) = "1" ]; then \
137-
cd /tmp && git clone --branch REL2_3_0 https://github.com/powa-team/pg_stat_kcache.git \
138-
&& cd pg_stat_kcache && make && make install; \
139-
fi \
133+
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-pg-stat-kcache \
140134
# pg_wait_sampling extension
141135
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-pg-wait-sampling \
142136
# pg_qualstats extension
@@ -164,19 +158,17 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
164158
&& USE_PGXS=1 make && USE_PGXS=1 make install; \
165159
fi \
166160
# pgvector extension
167-
&& if [ $(echo "$PG_SERVER_VERSION >= 12" | /usr/bin/bc) = "1" ]; then \
168-
cd /tmp && git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git \
161+
&& if [ $(echo "$PG_SERVER_VERSION >= 11" | /usr/bin/bc) = "1" ]; then \
162+
if [ "${PG_SERVER_VERSION}" = "11" ]; then PGVECTOR_VERSION="0.5.1"; \
163+
elif [ "${PG_SERVER_VERSION}" = "12" ]; then PGVECTOR_VERSION="0.7.4"; \
164+
else PGVECTOR_VERSION="${PGVECTOR_VERSION}"; \
165+
fi \
166+
&& cd /tmp && git clone --branch v${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git \
169167
&& cd pgvector && make OPTFLAGS="" install \
170168
&& mkdir /usr/share/doc/pgvector \
171169
&& cp LICENSE README.md /usr/share/doc/pgvector \
172170
&& cp sql/vector.sql /usr/share/postgresql/${PG_SERVER_VERSION}/extension/vector--${PGVECTOR_VERSION}.sql; \
173-
elif [ $(echo "$PG_SERVER_VERSION == 11" | /usr/bin/bc) = "1" ]; then \
174-
cd /tmp && git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git \
175-
&& cd pgvector && make OPTFLAGS="" install \
176-
&& mkdir /usr/share/doc/pgvector \
177-
&& cp LICENSE README.md /usr/share/doc/pgvector \
178-
&& cp sql/vector.sql /usr/share/postgresql/11/extension/vector--0.5.1.sql; \
179-
fi \
171+
fi \
180172
# pgBackRest
181173
&& apt-get install --no-install-recommends -y \
182174
pgbackrest zstd openssh-client \

extended-postgres/build-images-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ stages:
22
- build-image
33

44
.job_template: &build_image_definition_dh
5-
image: docker:19
5+
image: docker:24.0.6
66
stage: build-image
77
services:
88
- alias: docker
9-
name: docker:19.03.5-dind
9+
name: docker:24.0.6-dind
1010
script:
1111
- apk add --no-cache bash
1212
- bash ./ci_docker_build_push.sh
@@ -18,11 +18,11 @@ stages:
1818
DOCKER_NAME: "postgresai/extended-postgres"
1919

2020
.job_template: &build_image_definition_gl
21-
image: docker:19
21+
image: docker:24.0.6
2222
stage: build-image
2323
services:
2424
- alias: docker
25-
name: docker:19.03.5-dind
25+
name: docker:24.0.6-dind
2626
script:
2727
- apk add --no-cache bash
2828
- bash ./ci_docker_build_push.sh

extended-postgres/test-images-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ stages:
22
- test-image
33

44
.job_template: &test_image_definition
5-
image: docker:19
5+
image: docker:24.0.6
66
stage: test-image
77
services:
88
- alias: docker
9-
name: docker:19.03.5-dind
9+
name: docker:24.0.6-dind
1010
script:
1111
- apk add --no-cache bash
1212
- chmod +x extended-postgres/test/images_test.sh

extended-postgres/test/images_test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ docker stop "${PG_CONTAINER_NAME}" >/dev/null 2>&1
9292
# configure postgresql.conf
9393
CLEANED_PG_SERVER_VERSION=$(echo "$PG_SERVER_VERSION" | sed 's/rc.*//')
9494
BASE_LIBRARIES="pg_stat_statements,pg_stat_kcache,pg_cron,pgaudit,bg_mon"
95-
if [ "$(echo "$CLEANED_PG_SERVER_VERSION == 17" | /usr/bin/bc)" = "1" ]; then
96-
SHARED_PRELOAD_LIBRARIES="timescaledb,anon,${BASE_LIBRARIES}"
97-
elif [ "$(echo "$CLEANED_PG_SERVER_VERSION >= 12" | /usr/bin/bc)" = "1" ]; then
95+
if [ "$(echo "$CLEANED_PG_SERVER_VERSION >= 12" | /usr/bin/bc)" = "1" ]; then
9896
SHARED_PRELOAD_LIBRARIES="citus,timescaledb,anon,${BASE_LIBRARIES}"
9997
elif [ "$(echo "$CLEANED_PG_SERVER_VERSION == 11" | /usr/bin/bc)" = "1" ]; then
10098
SHARED_PRELOAD_LIBRARIES="citus,anon,${BASE_LIBRARIES}"

migration-tools/build-images-migration-tools.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ stages:
22
- build-image
33

44
.job_template: &build_image_definition_dh
5-
image: docker:19
5+
image: docker:24.0.6
66
stage: build-image
77
services:
88
- alias: docker
9-
name: docker:19.03.5-dind
9+
name: docker:24.0.6-dind
1010
script:
1111
- apk add --no-cache bash
1212
- bash ./ci_docker_build_push.sh
@@ -17,11 +17,11 @@ stages:
1717
DOCKER_NAME: "postgresai/migration-tools"
1818

1919
.job_template: &build_image_definition_gl
20-
image: docker:19
20+
image: docker:24.0.6
2121
stage: build-image
2222
services:
2323
- alias: docker
24-
name: docker:19.03.5-dind
24+
name: docker:24.0.6-dind
2525
script:
2626
- apk add --no-cache bash
2727
- bash ./ci_docker_build_push.sh

0 commit comments

Comments
 (0)