Skip to content

Commit

Permalink
fix citus installation
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaldivyam committed Apr 1, 2024
1 parent 86f0a3e commit 65809cf
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions postgres-cloudnative-citus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ LABEL name="PostgreSQL Container Images" \
description="This Docker image contains PostgreSQL and Barman Cloud based on Postgres ${PG_MAJOR}-bookworm."

RUN apt-get update \
&& apt-get install -y curl \
&& curl -sSLo /etc/apt/trusted.gpg.d/ibotty-postgresql-public.asc https://ibotty.github.io/postgresql-related-packages/ibotty-postgresql-public.asc \
&& curl -sSLo /etc/apt/sources.list.d/ibotty-postgresql-public.list https://ibotty.github.io/postgresql-related-packages/ibotty-postgresql-public.list \
&& curl -sSL https://install.citusdata.com/community/deb.sh | bash \
&& apt-get install -y curl

# Fetch additional repository keys and lists
RUN curl -sSLo /etc/apt/trusted.gpg.d/ibotty-postgresql-public.asc https://ibotty.github.io/postgresql-related-packages/ibotty-postgresql-public.asc \
&& curl -sSLo /etc/apt/sources.list.d/ibotty-postgresql-public.list https://ibotty.github.io/postgresql-related-packages/ibotty-postgresql-public.list

# Install Citus Data community edition
RUN curl -sSL https://install.citusdata.com/community/deb.sh | bash \
&& apt-get update \
&& apt-get dist-upgrade \
&& apt-get install -y \
&& apt-get dist-upgrade -y

# Install additional dependencies and PostgreSQL extensions
RUN apt-get install -y \
runit awscli zstd jq \
"postgresql-${PG_MAJOR}-pgaudit" \
"postgresql-${PG_MAJOR}-pgvector" \
Expand All @@ -30,14 +36,22 @@ RUN apt-get update \
"supabase-wrappers-pg${PG_MAJOR}" \
"pg-row-hashes-pg${PG_MAJOR}" \
"postgresql-${PG_MAJOR}-tds-fdw" \
"duckdb-fdw-pg${PG_MAJOR}" \
&& apt-get install -y python3-pip \
"duckdb-fdw-pg${PG_MAJOR}"

# Install Python3 and pip, then install python-snappy package
RUN apt-get install -y python3-pip \
&& pip install --break-system-packages python-snappy \
&& apt-get remove -y --autoremove python3-pip \
&& (cd /usr/bin && ln -s chpst /usr/bin/envdir) \
&& apt-get clean \
&& apt-get remove -y --autoremove python3-pip

# Create a symbolic link for envdir
RUN cd /usr/bin && ln -s chpst /usr/bin/envdir

# Clean up apt cache and temporary files
RUN apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/*

# Change the uid of postgres to 26
RUN usermod -u 26 postgres
USER 26

# Set the user to run subsequent commands as
USER 26

0 comments on commit 65809cf

Please sign in to comment.