FROM postgres:@@PG_VERSION@@-bookworm AS builder RUN apt-get update \ && apt-get install -y \ autoconf \ automake \ ca-certificates \ clang \ curl \ gcc \ git \ libcurl4-openssl-dev \ libkrb5-dev \ liblz4-dev \ libssl-dev \ libtool \ libzstd-dev \ make \ pkg-config \ postgresql-server-dev-@@PG_VERSION@@ WORKDIR /timeseries # install all extensions RUN git clone https://github.com/citusdata/pg_cron.git && \ cd pg_cron && \ make && make install && \ cd .. && rm -rf pg_cron RUN git clone https://github.com/pgpartman/pg_partman.git && \ cd pg_partman && \ make && make install && \ cd .. && rm -rf pg_partman RUN git clone https://github.com/citusdata/citus.git && \ cd citus && \ ./configure --without-libcurl && \ make && make install && \ cd .. && rm -rf citus RUN git clone https://github.com/ChuckHend/pg_ivm.git && \ cd pg_ivm && \ make && make install && \ cd .. && rm -rf pg_ivm # build and install timeseries COPY . . RUN make && make install || true FROM postgres:@@PG_VERSION@@-bookworm AS final COPY --from=builder /usr/share/postgresql/@@PG_VERSION@@/extension /usr/share/postgresql/@@PG_VERSION@@/extension COPY --from=builder /usr/lib/postgresql/@@PG_VERSION@@/lib /usr/lib/postgresql/@@PG_VERSION@@/lib COPY images/timeseries-pg/timeseries.conf . RUN cat timeseries.conf >> /usr/share/postgresql/@@PG_VERSION@@/postgresql.conf.sample USER postgres