From 10f9a23e89f21bc2c0de77993bd97d73019d77d5 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 9 May 2025 09:52:26 -0400 Subject: [PATCH] Add influxdb_fdw for making life easier --- ltss/Dockerfile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 ltss/Dockerfile diff --git a/ltss/Dockerfile b/ltss/Dockerfile new file mode 100644 index 0000000..4099803 --- /dev/null +++ b/ltss/Dockerfile @@ -0,0 +1,43 @@ +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/