FROM postgres as builder RUN apt-get update \ && apt-get install -y \ ca-certificates \ clang \ curl \ gcc \ git \ libssl-dev \ make \ pkg-config \ postgresql-server-dev-16 WORKDIR /monitor RUN git clone https://github.com/pgpartman/pg_partman.git && \ cd pg_partman && \ make && make install && \ cd .. && rm -rf pg_partman RUN apt install -y libcurl4-openssl-dev liblz4-dev libzstd-dev autoconf FROM postgres:16.3-bookworm COPY --from=builder /usr/share/postgresql/16/extension /usr/share/postgresql/16/extension COPY --from=builder /usr/lib/postgresql/16/lib /usr/lib/postgresql/16/lib