postgresql-containers/general/Dockerfile
Ryan Voots 4ffe8bc943
Some checks failed
/ build-general (push) Successful in 3m14s
/ build-base (push) Failing after 24s
Copy /usr/local/ also
2025-05-08 12:29:45 -04:00

47 lines
1.4 KiB
Docker

ARG PG_MAJOR_VERSION=17
ARG DEB_RELEASE=bookworm
ARG FMT_DATE=2025-05-08
ARG BASE_IMAGE_TAG=${PG_MAJOR_VERSION}-${DEB_RELEASE}-${FMT_DATE}
FROM gitea.simcop2387.info/simcop2387/postgresql-container-base:${BASE_IMAGE_TAG} AS pgbuilder
ARG POSTGIS_VERSION=3.5.2
ARG PGVECTOR_VERSION=
ARG PGXN_VERSION=
ARG TIMESCALEDB_VERSION=2.19.3
ARG HYPOPG_VERSION=
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
RUN mkdir -p /build/
RUN git clone https://github.com/timescale/timescaledb --depth=1 --recursive -b ${TIMESCALEDB_VERSION} /build/timescale/
WORKDIR /build/timescale/
RUN ./bootstrap
RUN cd build && make -j && make install
# TODO UPDATE PGCONFIG
# shared_preload_libraries = 'timescaledb'
WORKDIR /build
RUN git clone https://github.com/postgis/postgis --depth=1 --recursive -b ${POSTGIS_VERSION} /build/postgis/
WORKDIR /build/postgis
RUN ./autogen.sh && ./configure --enable-lto && make -j && make install
FROM gitea.simcop2387.info/simcop2387/postgresql-container-base:${BASE_IMAGE_TAG}
COPY --from=pgbuilder /usr/share/postgresql/ /usr/share/posrgresql/
COPY --from=pgbuilder /usr/lib/postgresql/ /usr/lib/postgresql/
COPY --from=pgbuilder /usr/local/ /usr/local/