diff --git a/postgres-cloudnative-citus/Dockerfile b/postgres-cloudnative-citus/Dockerfile index 41ef919..77be3e5 100644 --- a/postgres-cloudnative-citus/Dockerfile +++ b/postgres-cloudnative-citus/Dockerfile @@ -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" \ @@ -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 \ No newline at end of file