ARG PG_MAJOR_VERSION=17 ARG DEB_RELEASE=bookworm ARG BASE_IMAGE_TAG=${PG_MAJOR_VERSION}-${DEB_RELEASE} FROM gitea.simcop2387.info/simcop2387/postgresql-container-general:${BASE_IMAGE_TAG} AS pgbuilder RUN apt update && apt install -y build-essential flex bison git yacc cmake \ docbook-xsl-ns \ gettext \ libgdal-dev \ libgeos-dev \ libjson-c-dev \ libproj-dev \ libprotobuf-c-dev \ libsfcgal-dev \ libxml2-dev \ libxml2-utils \ protobuf-c-compiler \ xsltproc \ golang # AKA v2.2.0 according to commits, not released properly with a tag or github release as f 2025-05-10 ARG INFLUXDB_FDW_VERSION=9cb845e # RUN mkdir -p /build # WORKDIR /build # RUN git clone --recursive https://github.com/pgspider/influxdb-cxx /build/influxdb-cxx # RUN mkdir -p /build/influxdb-cxx/build # WORKDIR /build/influxdb-cxx/build # RUN cmake .. -DINFLUXCXX_WITH_BOOST=OFF -DINFLUXCXX_TESTING=OFF && make install WORKDIR /build RUN git clone --recursive https://github.com/pgspider/influxdb_fdw /build/influxdb_fdw WORKDIR /build/influxdb_fdw RUN go mod init github.com/pgspider/influxdb_fdw && go get github.com/influxdata/influxdb1-client/v2 && go mod tidy RUN git checkout ${INFLUXDB_FDW_VERSION} && make USE_PGXS=1 GO_CLIENT=1 with_llvm=no install FROM gitea.simcop2387.info/simcop2387/postgresql-container-general:${BASE_IMAGE_TAG} AS final COPY --from=pgbuilder /usr/share/postgresql/. /usr/share/postgresql/ COPY --from=pgbuilder /usr/lib/postgresql/. /usr/lib/postgresql/ COPY --from=pgbuilder /usr/local/. /usr/local/