@@ -4,13 +4,10 @@ ARG CGAL_GIT_BRANCH=5.6.x-branch
44FROM postgres:${PG_MAJOR_VERSION} AS builder
55ARG PG_MAJOR_VERSION
66ARG DOCKER_CMAKE_BUILD_TYPE
7-
87LABEL maintainer="TKamitaSoft Service - https://tkamitasoft.com" \
98 org.opencontainers.image.description="TKamitaSoft PostgrSQL database" \
109 org.opencontainers.image.source="https://gitlab.com/tkamitasoft/apps/host"
11-
1210WORKDIR /
13-
1411# apt-get install
1512RUN set -ex \
1613 && apt-get update -y \
@@ -76,9 +73,7 @@ RUN set -ex \
7673 libqhull-dev \
7774 libwebp-dev \
7875 libzstd-dev
79-
8076ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
81-
8277# cgal & sfcgal
8378# By utilizing the latest commit of the CGAL 5.x.x-branch and implementing a header-only build for SFCGAL,
8479# one can benefit from the latest CGAL patches while avoiding compatibility issues.
@@ -116,7 +111,6 @@ RUN set -ex \
116111 # clean
117112 && rm -fr /usr/src/SFCGAL \
118113 && rm -fr /usr/src/cgal
119-
120114# proj
121115ENV PROJ_GIT_HASH=356496f7b60ee0235189dd51d99aac700fbd2bdc
122116RUN set -ex \
@@ -146,7 +140,6 @@ RUN set -ex \
146140 fi \
147141 \
148142 && rm -fr /usr/src/PROJ
149-
150143# geos
151144ENV GEOS_GIT_HASH=a8d2ed0aba46f88f9b8987526e68eea6565d16ae
152145RUN set -ex \
@@ -162,7 +155,6 @@ RUN set -ex \
162155 && make install \
163156 && cd / \
164157 && rm -fr /usr/src/geos
165-
166158# gdal
167159ENV GDAL_GIT_HASH=d7aed6e0b03f949ba40684f868c63a08d89177b1
168160RUN set -ex \
@@ -232,7 +224,6 @@ RUN set -ex \
232224 && make install \
233225 && cd / \
234226 && rm -fr /usr/src/gdal
235-
236227# Minimal command line test.
237228RUN set -ex \
238229 && ldconfig \
@@ -244,15 +235,12 @@ RUN set -ex \
244235 && proj \
245236 && sfcgal-config --version \
246237 && pcre-config --version
247-
248238# -------------------------------------------
249239# STAGE final
250240# -------------------------------------------
251241FROM postgres:${PG_MAJOR_VERSION}
252-
253242ARG DOCKER_CMAKE_BUILD_TYPE
254243ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
255-
256244RUN set -ex \&& apt-get update -y \
257245 && apt-get install -y --no-install-recommends \
258246 curl \
@@ -290,18 +278,15 @@ RUN set -ex \&& apt-get update -y \
290278 libqhull-r8.0 \
291279 && apt-get clean -y \
292280 && rm -rf /var/lib/apt/lists/*
293-
294281COPY --from=builder /_pgis*.* /
295282COPY --from=builder /usr/local /usr/local
296-
297283ARG CGAL_GIT_BRANCH
298284ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
299285ENV CGAL5X_GIT_HASH=188e51bad36ffc30e49dbabda29620b71a84664c
300286ENV SFCGAL_GIT_HASH=61f3b08ade49493b56c6bafa98c7c1f84addbc10
301287ENV PROJ_GIT_HASH=356496f7b60ee0235189dd51d99aac700fbd2bdc
302288ENV GEOS_GIT_HASH=a8d2ed0aba46f88f9b8987526e68eea6565d16ae
303289ENV GDAL_GIT_HASH=d7aed6e0b03f949ba40684f868c63a08d89177b1
304-
305290# Minimal command line test ( fail fast )
306291RUN set -ex \
307292 && ldconfig \
@@ -317,15 +302,13 @@ RUN set -ex \
317302 # Testing ogr2ogr PostgreSQL driver.
318303 && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \
319304 || echo "ogr2ogr missing PostgreSQL driver" && exit 1
320-
321305# install postgis, pgvector, pgmq, pg_partman, potgresml, pgcat, patroni, pgcopydb
322306ENV POSTGIS_GIT_HASH=8ed84517a9b86c86724504d1b6a0f0c1ccd86cf6
323307ENV PGVECTOR_GIT_HASH=v0.7.2
324308ENV PGMQ_GIT_HASH=v1.3.3
325309ENV PGPARTMAN_GIT_HASH=v5.1.0
326310ENV TZ=UTC
327311ENV DEBIAN_FRONTEND=noninteractive
328-
329312RUN set -ex \
330313 && export DEBIAN_FRONTEND=noninteractive \
331314 && apt-get update -y \
@@ -506,19 +489,15 @@ RUN set -ex \
506489 xsltproc \
507490 && apt-get clean -y \
508491 && rm -rf /var/lib/apt/lists/* /root/.cache
509-
510492RUN mkdir -p /docker-entrypoint-initdb.d
511493COPY ./postgis/initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
512494COPY ./postgis/update-postgis.sh /usr/local/bin
513-
514495COPY ./patroni/entrypoint.sh /
515-
516496EXPOSE 5432 8008
517497ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 EDITOR=/usr/bin/editor
518498USER postgres
519499WORKDIR /home/postgres
520500CMD ["/bin/bash", "/entrypoint.sh"]
521-
522501# last final test
523502RUN set -ex \
524503 && ldconfig \
0 commit comments