Skip to content

Commit e4772b7

Browse files
committed
Add Dockerfile for PostgreSQL 17.6 with Citus 13.2 support
1 parent a3811d7 commit e4772b7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

postgres-17/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is auto generated from it's template,
2+
# see citusdata/tools/packaging_automation/templates/docker/latest/latest.tmpl.dockerfile.
3+
FROM postgres:17.6-bookworm
4+
ARG VERSION=13.2.0
5+
LABEL maintainer="Citus Data https://citusdata.com" \
6+
org.label-schema.name="Citus" \
7+
org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \
8+
org.label-schema.url="https://www.citusdata.com" \
9+
org.label-schema.vcs-url="https://github.com/citusdata/citus" \
10+
org.label-schema.vendor="Citus Data, Inc." \
11+
org.label-schema.version=${VERSION} \
12+
org.label-schema.schema-version="1.0"
13+
14+
ENV CITUS_VERSION ${VERSION}.citus-1
15+
16+
# install Citus
17+
RUN apt-get update \
18+
&& apt-get install -y --no-install-recommends \
19+
ca-certificates \
20+
curl \
21+
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
22+
&& apt-get install -y postgresql-$PG_MAJOR-citus-13.2=$CITUS_VERSION \
23+
postgresql-$PG_MAJOR-hll=2.18.citus-1 \
24+
postgresql-$PG_MAJOR-topn=2.7.0.citus-1 \
25+
&& apt-get purge -y --auto-remove curl \
26+
&& rm -rf /var/lib/apt/lists/*
27+
28+
# add citus to default PostgreSQL config
29+
RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample
30+
31+
# add scripts to run after initdb
32+
COPY 001-create-citus-extension.sql /docker-entrypoint-initdb.d/
33+
34+
# add health check script
35+
COPY pg_healthcheck wait-for-manager.sh /
36+
RUN chmod +x /wait-for-manager.sh
37+
38+
# entry point unsets PGPASSWORD, but we need it to connect to workers
39+
# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303
40+
RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh
41+
42+
HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck

0 commit comments

Comments
 (0)