Skip to content

Instantly share code, notes, and snippets.

@anandpathak
Created October 26, 2021 12:38
Show Gist options
  • Save anandpathak/fea0251f3ba8b6f71f4457011da51df7 to your computer and use it in GitHub Desktop.
Save anandpathak/fea0251f3ba8b6f71f4457011da51df7 to your computer and use it in GitHub Desktop.
docker file for postgres 12 with partman
FROM postgres:12
RUN apt-get update && \
apt-get install -y git make gcc
RUN git clone https://github.com/pgpartman/pg_partman
RUN cd pg_partman && make NO_BGW=1 install
RUN psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE SCHEMA partman; CREATE EXTENSION pg_partman SCHEMA partman;"%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment