Permalink
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (36 sloc) 1.72 KB
FROM postgres:11
ARG VERSION=8.0.0-1
LABEL maintainer="Citus Data https://citusdata.com" \
org.label-schema.name="Citus" \
org.label-schema.description="Scalable PostgreSQL for multi-tenant and real-time workloads" \
org.label-schema.url="https://www.citusdata.com" \
org.label-schema.vcs-url="https://github.com/citusdata/citus" \
org.label-schema.vendor="Citus Data, Inc." \
org.label-schema.version=${VERSION} \
org.label-schema.schema-version="1.0"
# we released 8.0.0-1 version for docker image to update postgresql-hll
# however, citus itself does not have 8.0.0-1 version so we are
# hardcoding version number here. In the future we should change
# hardcoded part to use $VERSION instead
ENV CITUS_VERSION 8.0.0.citus-1
# install Citus
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
&& curl -s https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y postgresql-$PG_MAJOR-citus-8.0=$CITUS_VERSION \
postgresql-$PG_MAJOR-hll=2.12.citus-1 \
postgresql-$PG_MAJOR-topn=2.2.0 \
&& apt-get purge -y --auto-remove curl \
&& rm -rf /var/lib/apt/lists/*
# set locale
RUN localedef -i ja_JP -c -f UTF-8 -A /usr/share/locale/locale.alias ja_JP.UTF-8
# ENV LANG ja_JP.utf8
# add citus to default PostgreSQL config
RUN echo "shared_preload_libraries='citus'" >> /usr/share/postgresql/postgresql.conf.sample
# add scripts to run after initdb
COPY 000-configure-stats.sh 001-create-citus-extension.sql 002-create-collation.sql /docker-entrypoint-initdb.d/
# add health check script
COPY pg_healthcheck /
HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck