diff --git a/.circleci/config.yml b/.circleci/config.yml index 793b99aa..5cf53357 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,8 @@ orbs: docker: circleci/docker@2.4.0 # https://circleci.com/developer/orbs/orb/circleci/python python: circleci/python@2.1.1 - + # https://circleci.com/developer/orbs/orb/circleci/shellcheck + shellcheck: circleci/shellcheck@3.2.0 jobs: build-arm64: @@ -99,24 +100,23 @@ workflows: "12-3.4-bookworm", "12-3.4-bullseye", "13-3.4-alpine3.18", -# --skip-- "13-3.4-bookworm", --> generated with the related bundle job! + "13-3.4-bookworm", "13-3.4-bullseye", - "13-3.4-bundle-bookworm", "14-3.4-alpine3.18", # --skip-- "14-3.4-bookworm", --> generated with the related bundle job! "14-3.4-bullseye", - "14-3.4-bundle-bookworm", + "14-3.4-bundle0-bookworm", "15-3.4-alpine3.18", # --skip-- "15-3.4-bookworm", --> generated with the related bundle job! "15-3.4-bullseye", - "15-3.4-bundle-bookworm", + "15-3.4-bundle0-bookworm", "15-master-bookworm", - "15-recentstack-bookworm", + "15-recent-bookworm", "16-3.4-alpine3.18", # --skip-- "16-3.4-bookworm", --> generated with the related bundle job! "16-3.4-bullseye", - "16-3.4-bundle-bookworm", + "16-3.4-bundle0-bookworm", "16-master-bookworm", - "16-recentstack-bookworm", + "16-recent-bookworm", #circleci-targets-end ] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de3bdaa5..b84c39a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,25 +31,24 @@ jobs: - { version: "12-3.4", variant: "bookworm", postgres: "12", postgis: "3.4", arch: "amd64 arm64", tags: "12-3.4-bookworm 12-3.4.0-bookworm 12-3.4", readme_group: "bookworm" } - { version: "12-3.4", variant: "bullseye", postgres: "12", postgis: "3.4", arch: "amd64 arm64", tags: "12-3.4-bullseye 12-3.4.0-bullseye", readme_group: "bullseye" } - { version: "13-3.4", variant: "alpine3.18", postgres: "13", postgis: "3.4", arch: "amd64 arm64", tags: "13-3.4-alpine3.18 13-3.4.0-alpine3.18 13-3.4-alpine", readme_group: "alpine3.18" } -# --skip-- - { version: "13-3.4", variant: "bookworm", postgres: "13", postgis: "3.4", arch: "amd64 arm64", tags: "13-3.4-bookworm 13-3.4.0-bookworm 13-3.4", readme_group: "bookworm" } + - { version: "13-3.4", variant: "bookworm", postgres: "13", postgis: "3.4", arch: "amd64 arm64", tags: "13-3.4-bookworm 13-3.4.0-bookworm 13-3.4", readme_group: "bookworm" } - { version: "13-3.4", variant: "bullseye", postgres: "13", postgis: "3.4", arch: "amd64 arm64", tags: "13-3.4-bullseye 13-3.4.0-bullseye", readme_group: "bullseye" } - - { version: "13-3.4-bundle", variant: "bookworm", postgres: "13", postgis: "3.4", arch: "amd64 arm64", tags: "13-3.4-bundle-bookworm 13-3.4.0-bundle-bookworm 13-3.4-bundle", readme_group: "bundle" } - { version: "14-3.4", variant: "alpine3.18", postgres: "14", postgis: "3.4", arch: "amd64 arm64", tags: "14-3.4-alpine3.18 14-3.4.0-alpine3.18 14-3.4-alpine", readme_group: "alpine3.18" } # --skip-- - { version: "14-3.4", variant: "bookworm", postgres: "14", postgis: "3.4", arch: "amd64 arm64", tags: "14-3.4-bookworm 14-3.4.0-bookworm 14-3.4", readme_group: "bookworm" } - { version: "14-3.4", variant: "bullseye", postgres: "14", postgis: "3.4", arch: "amd64 arm64", tags: "14-3.4-bullseye 14-3.4.0-bullseye", readme_group: "bullseye" } - - { version: "14-3.4-bundle", variant: "bookworm", postgres: "14", postgis: "3.4", arch: "amd64 arm64", tags: "14-3.4-bundle-bookworm 14-3.4.0-bundle-bookworm 14-3.4-bundle", readme_group: "bundle" } + - { version: "14-3.4-bundle0", variant: "bookworm", postgres: "14", postgis: "3.4", arch: "amd64 arm64", tags: "14-3.4-bundle0-bookworm 14-3.4.0-bundle0-bookworm 14-3.4-bundle0", readme_group: "bundle0" } - { version: "15-3.4", variant: "alpine3.18", postgres: "15", postgis: "3.4", arch: "amd64 arm64", tags: "15-3.4-alpine3.18 15-3.4.0-alpine3.18 15-3.4-alpine alpine", readme_group: "alpine3.18" } # --skip-- - { version: "15-3.4", variant: "bookworm", postgres: "15", postgis: "3.4", arch: "amd64 arm64", tags: "15-3.4-bookworm 15-3.4.0-bookworm 15-3.4 latest", readme_group: "bookworm" } - { version: "15-3.4", variant: "bullseye", postgres: "15", postgis: "3.4", arch: "amd64 arm64", tags: "15-3.4-bullseye 15-3.4.0-bullseye", readme_group: "bullseye" } - - { version: "15-3.4-bundle", variant: "bookworm", postgres: "15", postgis: "3.4", arch: "amd64 arm64", tags: "15-3.4-bundle-bookworm 15-3.4.0-bundle-bookworm 15-3.4-bundle bundle", readme_group: "bundle" } + - { version: "15-3.4-bundle0", variant: "bookworm", postgres: "15", postgis: "3.4", arch: "amd64 arm64", tags: "15-3.4-bundle0-bookworm 15-3.4.0-bundle0-bookworm 15-3.4-bundle0 bundle0", readme_group: "bundle0" } - { version: "15-master", variant: "bookworm", postgres: "15", postgis: "master", arch: "amd64 arm64", tags: "15-master-bookworm 15-master", readme_group: "test" } - - { version: "15-recentstack", variant: "bookworm", postgres: "15", postgis: "recentstack", arch: "amd64 arm64", tags: "15-recentstack-bookworm 15-recentstack", readme_group: "recentstack" } + - { version: "15-recent", variant: "bookworm", postgres: "15", postgis: "recent", arch: "amd64 arm64", tags: "15-recent-bookworm 15-recent", readme_group: "recent" } - { version: "16-3.4", variant: "alpine3.18", postgres: "16", postgis: "3.4", arch: "amd64 arm64", tags: "16-3.4-alpine3.18 16-3.4.0-alpine3.18 16-3.4-alpine", readme_group: "alpine3.18" } # --skip-- - { version: "16-3.4", variant: "bookworm", postgres: "16", postgis: "3.4", arch: "amd64 arm64", tags: "16-3.4-bookworm 16-3.4.0-bookworm 16-3.4", readme_group: "bookworm" } - { version: "16-3.4", variant: "bullseye", postgres: "16", postgis: "3.4", arch: "amd64 arm64", tags: "16-3.4-bullseye 16-3.4.0-bullseye", readme_group: "bullseye" } - - { version: "16-3.4-bundle", variant: "bookworm", postgres: "16", postgis: "3.4", arch: "amd64 arm64", tags: "16-3.4-bundle-bookworm 16-3.4.0-bundle-bookworm 16-3.4-bundle", readme_group: "bundle" } + - { version: "16-3.4-bundle0", variant: "bookworm", postgres: "16", postgis: "3.4", arch: "amd64 arm64", tags: "16-3.4-bundle0-bookworm 16-3.4.0-bundle0-bookworm 16-3.4-bundle0", readme_group: "bundle0" } - { version: "16-master", variant: "bookworm", postgres: "16", postgis: "master", arch: "amd64 arm64", tags: "16-master-bookworm 16-master", readme_group: "test" } - - { version: "16-recentstack", variant: "bookworm", postgres: "16", postgis: "recentstack", arch: "amd64 arm64", tags: "16-recentstack-bookworm 16-recentstack", readme_group: "recentstack" } + - { version: "16-recent", variant: "bookworm", postgres: "16", postgis: "recent", arch: "amd64 arm64", tags: "16-recent-bookworm 16-recent", readme_group: "recent" } #matrix-include-end name: "${{ matrix.version }}-${{ matrix.variant }} docker image" @@ -156,12 +155,21 @@ jobs: - name: Checkout source uses: actions/checkout@v4 + - name: Install manifest-tool + run: | + wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz + mkdir manifest-tool + tar -xvzf binaries-manifest-tool-2.0.8.tar.gz -C manifest-tool + sudo mv manifest-tool/manifest-tool-linux-amd64 /usr/local/bin/manifest-tool + manifest-tool -v + + - run: pip install lastversion + - name: Environment init run: source tools/environment_init.sh - run: make check_version -#TODO: fix waiting for CircleCI - run: sleep 20m # Wait for CircleCI to finish building images; Temporary workarounds - name: Login to dockerhub @@ -171,18 +179,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - - name: Install manifest-tool - run: | - wget https://github.com/estesp/manifest-tool/releases/download/v2.0.8/binaries-manifest-tool-2.0.8.tar.gz - mkdir manifest-tool - tar -xvzf binaries-manifest-tool-2.0.8.tar.gz -C manifest-tool - sudo mv manifest-tool/manifest-tool-linux-amd64 /usr/local/bin/manifest-tool - manifest-tool -v - -# - name: Update docker manifest -# if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} -# run: ./manifest.sh - - name: push readme to docker hub api if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} env: @@ -190,4 +186,7 @@ jobs: DOCKERHUB_ACCESS_TOKEN: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} run: make push-readme + - name: Update docker manifest + if: ${{ (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} + run: ./manifest.sh diff --git a/11-3.3/alpine3.18/Dockerfile b/11-3.3/alpine3.18/Dockerfile index 4f9669ef..53966af9 100644 --- a/11-3.3/alpine3.18/Dockerfile +++ b/11-3.3/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:11-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.3.4 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=846cce0c6420a3d0483d2a1a3baee182d2fc1217 +ARG PGIS1_BASE_IMAGE=postgres:11-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=846cce0c6420a3d0483d2a1a3baee182d2fc1217 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 11 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 11 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.3.4 -ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e +# ENV POSTGIS_VERSION 3.3.4 +# ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/12-3.4/alpine3.18/Dockerfile b/12-3.4/alpine3.18/Dockerfile index c199552b..4c88e312 100644 --- a/12-3.4/alpine3.18/Dockerfile +++ b/12-3.4/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:12-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 +ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.0 spatial database extension with PostgreSQL 12 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.0 -ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 +# ENV POSTGIS_VERSION 3.4.0 +# ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/13-3.4-bundle/bookworm/Dockerfile b/13-3.4-bundle/bookworm/Dockerfile deleted file mode 100644 index f5286ca3..00000000 --- a/13-3.4-bundle/bookworm/Dockerfile +++ /dev/null @@ -1,327 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - - -# Experimental Geo Bundle package. -# This is a work in progress and not yet ready for production. -# Some packages will be removed from this bundle and others will be added. -# The goal is to have a bundle that includes all the most popular extensions with PostGIS - -# set the base image , make build-* is overwriting with the actual value ! - -ARG REGISTRY=docker.io -ARG REPO_NAME=imresamu -ARG IMAGE_NAME=postgis-amd64 - -ARG PGIS_V1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:13-3.4-bookworm - -ARG PGIS_V1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS_V1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be - -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 - -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 - -FROM ${PGIS_V1_BASE_IMAGE} AS builder - -RUN set -ex \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - cmake \ - g++ \ - git \ - make \ - pgxnclient \ - postgresql-server-dev-$PG_MAJOR \ - unzip \ - wget \ - # MobilityDB - libgeos++-dev \ - libgsl-dev \ - libjson-c-dev \ - libproj-dev \ - # TimescaleDB - libkrb5-dev \ - # pgsql-http - libcurl4-gnutls-dev \ - # pgsql-gzip - zlib1g-dev \ - # sqlite_fdw - sqlite3 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -ARG PGIS_V1_MOBILITYDB_REPOSITORY -ARG PGIS_V1_MOBILITYDB_CHECKOUT -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1 - -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY -ARG PGIS_V1_TIMESCALEDB_REPOSITORY -ARG PGIS_V1_TIMESCALEDB_CHECKOUT -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 - -RUN set -ex \ - && mkdir -p /pgsql-gzip \ - && cd pgsql-gzip \ - && git init \ - && git remote add origin ${PGIS_V1_PGSQL_GZIP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_GZIP_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ - && git log -1 > /_pgsql_gzip_last_commit.txt \ - && make -j$(nproc) \ - && make install - -RUN set -ex \ - && mkdir -p /pgsql-http \ - && cd pgsql-http \ - && git init \ - && git remote add origin ${PGIS_V1_PGSQL_HTTP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_HTTP_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ - && git log -1 > /_pgsql_http_last_commit.txt \ - && make -j$(nproc) \ - && make install - - -# Install TimescaleDB; no Arm64 apt support, so build from source -RUN set -ex \ - && mkdir -p /timescaledb \ - && cd timescaledb \ - && git init \ - && git remote add origin ${PGIS_V1_TIMESCALEDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_TIMESCALEDB_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ - && git log -1 > /_timescaledb_last_commit.txt \ - && ./bootstrap \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DCMAKE_POLICY_DEFAULT_CMP0069=NEW \ - \ - -DAPACHE_ONLY=${PGIS_V1_TIMESCALEDB_APACHE_ONLY} \ - -DREGRESS_CHECKS=OFF \ - -DSEND_TELEMETRY_DEFAULT=NO \ - -DTAP_CHECKS=OFF \ - -DWARNINGS_AS_ERRORS=OFF \ - -DENABLE_DEBUG_UTILS=OFF \ - && cd build \ - && make -j$(nproc) \ - && make install - - - -# Install MobilityDB -RUN set -ex \ - && mkdir -p /MobilityDB \ - && cd MobilityDB \ - && git init \ - && git remote add origin ${PGIS_V1_MOBILITYDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_MOBILITYDB_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ - && git log -1 > /_MobilityDB_last_commit.txt \ - && mkdir build \ - && cd build \ - && cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ - -DCMAKE_POLICY_DEFAULT_CMP0069=NEW \ - .. \ - && make -j$(nproc) \ - && make install - -RUN pgxn install ddlx -RUN pgxn install h3 # https://github.com/zachasme/h3-pg -RUN pgxn install json_accessors -RUN pgxn install lostgis -RUN pgxn install parray_gin -RUN pgxn install pg_curl # https://github.com/RekGRpth/pg_curl -RUN pgxn install pg_roaringbitmap -RUN pgxn install pg_rowalesce -RUN pgxn install pg_uuidv7 -RUN pgxn install pg_xenophile -RUN pgxn install pg_xxhash -RUN pgxn install pgsql_tweaks - -RUN USE_PGXS=1 pgxn install sqlite_fdw - -RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ - && cd postgres_dba \ - && rm -rf .git - - -#TODO: add https://github.com/hydradatabase/hydra -# https://github.com/powa-team/pg_qualstats -# https://github.com/darold/pgtt -# https://github.com/apache/arrow-flight-sql-postgresql -# https://github.com/neondatabase/pg_embedding/ -# pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken -# -# -------------------------------------------------------------- - - -FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:13-3.4-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS Bundle - 13-3.4-bookworm " \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -# install all utf8 locales; -# helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization -#TODO - uncomment -RUN set -ex \ - && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ - && locale-gen - -RUN set -ex \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - \ - bzip2 \ - curl \ - jq \ - unzip \ - wget \ - \ - gdal-bin \ - proj-bin \ - sqlite3 \ - \ - pipx \ - python-is-python3 \ - python3 \ - python3-geoalchemy2 \ - python3-pglast \ - python3-pip \ - python3-psycopg2 \ - python3-setuptools \ - python3-sqlalchemy \ - \ - postgis \ - postgresql \ - postgresql-$PG_MAJOR-ogr-fdw \ - postgresql-$PG_MAJOR-pgrouting \ - postgresql-$PG_MAJOR-pgrouting-scripts \ - postgresql-$PG_MAJOR-pgvector \ - postgresql-client-common \ - postgresql-common \ - postgresql-contrib \ - postgresql-plpython3-$PG_MAJOR \ - postgresql-postgis \ - postgresql-postgis-scripts \ - \ - pgbackrest \ - pgbadger \ - pgtap \ - pgtop \ - pspg \ - \ - postgresql-$PG_MAJOR-asn1oid \ - postgresql-$PG_MAJOR-cron \ - postgresql-$PG_MAJOR-decoderbufs \ - postgresql-$PG_MAJOR-extra-window-functions \ - postgresql-$PG_MAJOR-first-last-agg \ - postgresql-$PG_MAJOR-hll \ - postgresql-$PG_MAJOR-hypopg \ - postgresql-$PG_MAJOR-icu-ext \ - postgresql-$PG_MAJOR-jsquery \ - postgresql-$PG_MAJOR-numeral \ - postgresql-$PG_MAJOR-pg-failover-slots \ - postgresql-$PG_MAJOR-pg-stat-kcache \ - postgresql-$PG_MAJOR-pgaudit \ - postgresql-$PG_MAJOR-pgmp \ - postgresql-$PG_MAJOR-pgpcre \ - postgresql-$PG_MAJOR-pgq3 \ - postgresql-$PG_MAJOR-pgsphere \ - postgresql-$PG_MAJOR-pgtap \ - postgresql-$PG_MAJOR-pldebugger \ - postgresql-$PG_MAJOR-prefix \ - postgresql-$PG_MAJOR-prefix \ - postgresql-$PG_MAJOR-prioritize \ - postgresql-$PG_MAJOR-q3c \ - postgresql-$PG_MAJOR-repack \ - postgresql-$PG_MAJOR-rum \ - \ - postgresql-$PG_MAJOR-partman \ - postgresql-$PG_MAJOR-pg-fact-loader \ - postgresql-$PG_MAJOR-pglogical \ - postgresql-$PG_MAJOR-plpgsql-check \ - postgresql-$PG_MAJOR-pointcloud \ - postgresql-$PG_MAJOR-squeeze \ - # - # add MobilityDb missing dependency from libgsl-dev - libgsl27 \ - \ - # && pip3 install --upgrade pip \ - \ -# && pipx install geopy \ -# && pipx install plpygis \ -# && pipx install pygml \ -# && pipx install shapely \ - \ - && rm -Rf /root/.cache/pip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -# Install MobilityDB,Timescaledb,h3,etc from builder -COPY --from=builder /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ -COPY --from=builder /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -COPY --from=builder /postgres_dba /postgres_dba - -# check any missing dependencies -RUN set -ex \ - && ldd /usr/lib/postgresql/$PG_MAJOR/lib/*.so | grep 'not found' && exit 1 || true - -# multiple LLVM existance is not allowed. -RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ - && if [ "$llvm_count" -ne 1 ]; then \ - echo "More than one llvm package or none at all found. Stopping."; \ - dpkg -l | grep llvm ; \ - exit 1; \ - fi - -# add MobilityDB requirements -RUN set -eux; \ - cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ - # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ - # MobilityDB recomendation - echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ - echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample - -# for postgres_dba Use ":dba" to see menu -RUN printf "%s %s %s %s\n" \\set dba \'\\\\i /postgres_dba/start.psql\' >> ~/.psqlrc diff --git a/13-3.4-bundle/bookworm/tags b/13-3.4-bundle/bookworm/tags deleted file mode 100644 index fb82f199..00000000 --- a/13-3.4-bundle/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.4-bundle-bookworm 13-3.4.0-bundle-bookworm 13-3.4-bundle diff --git a/13-3.4/alpine3.18/Dockerfile b/13-3.4/alpine3.18/Dockerfile index 45345cd1..f4e4d9d5 100644 --- a/13-3.4/alpine3.18/Dockerfile +++ b/13-3.4/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:13-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.0 spatial database extension with PostgreSQL 13 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.0 -ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 +# ENV POSTGIS_VERSION 3.4.0 +# ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/14-3.4-bundle/bookworm/tags b/14-3.4-bundle/bookworm/tags deleted file mode 100644 index 7980ed50..00000000 --- a/14-3.4-bundle/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.4-bundle-bookworm 14-3.4.0-bundle-bookworm 14-3.4-bundle diff --git a/14-3.4-bundle/bookworm/Dockerfile b/14-3.4-bundle0/bookworm/Dockerfile similarity index 60% rename from 14-3.4-bundle/bookworm/Dockerfile rename to 14-3.4-bundle0/bookworm/Dockerfile index 5cde84a5..f12e87cb 100644 --- a/14-3.4-bundle/bookworm/Dockerfile +++ b/14-3.4-bundle0/bookworm/Dockerfile @@ -1,6 +1,6 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle.template" +# source: "Dockerfile.bundle0.template" # PLEASE DO NOT EDIT IT DIRECTLY. # @@ -16,26 +16,30 @@ ARG REGISTRY=docker.io ARG REPO_NAME=imresamu ARG IMAGE_NAME=postgis-amd64 -ARG PGIS_V1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:14-3.4-bookworm +ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:14-3.4-bookworm -ARG PGIS_V1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS_V1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec +ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git +ARG PGIS1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be +ARG PGIS1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git +ARG PGIS1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 +ARG PGIS1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git +ARG PGIS1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS1_TIMESCALEDB_APACHE_ONLY=false +ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git +ARG PGIS1_TIMESCALEDB_CHECKOUT=tags/2.12.1-rc1 +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1=c93faddbe95e45d93a53c3f652e2033558e8b380 -FROM ${PGIS_V1_BASE_IMAGE} AS builder +ARG PGIS1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS1_PG_HINT_PLAN_CHECKOUT=tags/REL14_1_4_2 +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=81e4f0f37966081bc1909db9796bfc1b1b5d2349 + +FROM ${PGIS1_BASE_IMAGE} AS builder RUN set -ex \ && apt-get update \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -70,32 +76,25 @@ RUN set -ex \ && rm -rf /var/lib/apt/lists/* -ARG PGIS_V1_MOBILITYDB_REPOSITORY -ARG PGIS_V1_MOBILITYDB_CHECKOUT -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-http-gzip -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_HTTP_REPOSITORY +ARG PGIS1_PGSQL_HTTP_CHECKOUT +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY -ARG PGIS_V1_TIMESCALEDB_REPOSITORY -ARG PGIS_V1_TIMESCALEDB_CHECKOUT -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_GZIP_REPOSITORY +ARG PGIS1_PGSQL_GZIP_CHECKOUT +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1 RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_GZIP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_GZIP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_GZIP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_GZIP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_gzip_last_commit.txt \ && make -j$(nproc) \ && make install @@ -104,33 +103,40 @@ RUN set -ex \ && mkdir -p /pgsql-http \ && cd pgsql-http \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_HTTP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_HTTP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_HTTP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_HTTP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_http_last_commit.txt \ && make -j$(nproc) \ && make install +FROM builder as builder-timescaledb + +ARG PGIS1_TIMESCALEDB_APACHE_ONLY +ARG PGIS1_TIMESCALEDB_REPOSITORY +ARG PGIS1_TIMESCALEDB_CHECKOUT +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1 + # Install TimescaleDB; no Arm64 apt support, so build from source RUN set -ex \ && mkdir -p /timescaledb \ && cd timescaledb \ && git init \ - && git remote add origin ${PGIS_V1_TIMESCALEDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_TIMESCALEDB_CHECKOUT} \ + && git remote add origin ${PGIS1_TIMESCALEDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_TIMESCALEDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_timescaledb_last_commit.txt \ && ./bootstrap \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_POLICY_DEFAULT_CMP0069=NEW \ \ - -DAPACHE_ONLY=${PGIS_V1_TIMESCALEDB_APACHE_ONLY} \ + -DAPACHE_ONLY=${PGIS1_TIMESCALEDB_APACHE_ONLY} \ -DREGRESS_CHECKS=OFF \ -DSEND_TELEMETRY_DEFAULT=NO \ -DTAP_CHECKS=OFF \ @@ -142,16 +148,22 @@ RUN set -ex \ +FROM builder as builder-mobilitydb + +ARG PGIS1_MOBILITYDB_REPOSITORY +ARG PGIS1_MOBILITYDB_CHECKOUT +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 + # Install MobilityDB RUN set -ex \ && mkdir -p /MobilityDB \ && cd MobilityDB \ && git init \ - && git remote add origin ${PGIS_V1_MOBILITYDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_MOBILITYDB_CHECKOUT} \ + && git remote add origin ${PGIS1_MOBILITYDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_MOBILITYDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_MobilityDB_last_commit.txt \ && mkdir build \ && cd build \ @@ -162,6 +174,9 @@ RUN set -ex \ && make -j$(nproc) \ && make install + +FROM builder as builder-pgxn + RUN pgxn install ddlx RUN pgxn install h3 # https://github.com/zachasme/h3-pg RUN pgxn install json_accessors @@ -177,22 +192,39 @@ RUN pgxn install pgsql_tweaks RUN USE_PGXS=1 pgxn install sqlite_fdw + +FROM builder as builder-other + +ARG PGIS1_PG_HINT_PLAN_REPOSITORY +ARG PGIS1_PG_HINT_PLAN_CHECKOUT +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 + +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install + RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git -#TODO: add https://github.com/hydradatabase/hydra -# https://github.com/powa-team/pg_qualstats -# https://github.com/darold/pgtt -# https://github.com/apache/arrow-flight-sql-postgresql -# https://github.com/neondatabase/pg_embedding/ -# pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken -# -# -------------------------------------------------------------- - - FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:14-3.4-bookworm LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -201,7 +233,6 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization -#TODO - uncomment RUN set -ex \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen @@ -296,11 +327,23 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Install from stages +COPY --from=builder-http-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-http-gzip /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-mobilitydb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-mobilitydb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-timescaledb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-timescaledb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-pgxn /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-pgxn /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-other /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-other /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -# Install MobilityDB,Timescaledb,h3,etc from builder -COPY --from=builder /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ -COPY --from=builder /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -COPY --from=builder /postgres_dba /postgres_dba +COPY --from=builder-other /postgres_dba /postgres_dba # check any missing dependencies RUN set -ex \ @@ -318,7 +361,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/14-3.4-bundle0/bookworm/tags b/14-3.4-bundle0/bookworm/tags new file mode 100644 index 00000000..f97bd34a --- /dev/null +++ b/14-3.4-bundle0/bookworm/tags @@ -0,0 +1 @@ +14-3.4-bundle0-bookworm 14-3.4.0-bundle0-bookworm 14-3.4-bundle0 diff --git a/14-3.4/alpine3.18/Dockerfile b/14-3.4/alpine3.18/Dockerfile index 7a9623eb..a10cb888 100644 --- a/14-3.4/alpine3.18/Dockerfile +++ b/14-3.4/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:14-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.0 spatial database extension with PostgreSQL 14 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.0 -ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 +# ENV POSTGIS_VERSION 3.4.0 +# ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/15-3.4-bundle/bookworm/tags b/15-3.4-bundle/bookworm/tags deleted file mode 100644 index 3fcf4b6c..00000000 --- a/15-3.4-bundle/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-bundle-bookworm 15-3.4.0-bundle-bookworm 15-3.4-bundle bundle diff --git a/15-3.4-bundle/bookworm/Dockerfile b/15-3.4-bundle0/bookworm/Dockerfile similarity index 60% rename from 15-3.4-bundle/bookworm/Dockerfile rename to 15-3.4-bundle0/bookworm/Dockerfile index 698a68ba..2bba1a22 100644 --- a/15-3.4-bundle/bookworm/Dockerfile +++ b/15-3.4-bundle0/bookworm/Dockerfile @@ -1,6 +1,6 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle.template" +# source: "Dockerfile.bundle0.template" # PLEASE DO NOT EDIT IT DIRECTLY. # @@ -16,26 +16,30 @@ ARG REGISTRY=docker.io ARG REPO_NAME=imresamu ARG IMAGE_NAME=postgis-amd64 -ARG PGIS_V1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm +ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm -ARG PGIS_V1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS_V1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec +ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git +ARG PGIS1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be +ARG PGIS1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git +ARG PGIS1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 +ARG PGIS1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git +ARG PGIS1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS1_TIMESCALEDB_APACHE_ONLY=false +ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git +ARG PGIS1_TIMESCALEDB_CHECKOUT=tags/2.12.1-rc1 +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1=c93faddbe95e45d93a53c3f652e2033558e8b380 -FROM ${PGIS_V1_BASE_IMAGE} AS builder +ARG PGIS1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS1_PG_HINT_PLAN_CHECKOUT=tags/REL15_1_5_1 +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=7a41e7ba94c8769895fefbb282f6943067adac2e + +FROM ${PGIS1_BASE_IMAGE} AS builder RUN set -ex \ && apt-get update \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -70,32 +76,25 @@ RUN set -ex \ && rm -rf /var/lib/apt/lists/* -ARG PGIS_V1_MOBILITYDB_REPOSITORY -ARG PGIS_V1_MOBILITYDB_CHECKOUT -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-http-gzip -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_HTTP_REPOSITORY +ARG PGIS1_PGSQL_HTTP_CHECKOUT +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY -ARG PGIS_V1_TIMESCALEDB_REPOSITORY -ARG PGIS_V1_TIMESCALEDB_CHECKOUT -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_GZIP_REPOSITORY +ARG PGIS1_PGSQL_GZIP_CHECKOUT +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1 RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_GZIP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_GZIP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_GZIP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_GZIP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_gzip_last_commit.txt \ && make -j$(nproc) \ && make install @@ -104,33 +103,40 @@ RUN set -ex \ && mkdir -p /pgsql-http \ && cd pgsql-http \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_HTTP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_HTTP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_HTTP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_HTTP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_http_last_commit.txt \ && make -j$(nproc) \ && make install +FROM builder as builder-timescaledb + +ARG PGIS1_TIMESCALEDB_APACHE_ONLY +ARG PGIS1_TIMESCALEDB_REPOSITORY +ARG PGIS1_TIMESCALEDB_CHECKOUT +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1 + # Install TimescaleDB; no Arm64 apt support, so build from source RUN set -ex \ && mkdir -p /timescaledb \ && cd timescaledb \ && git init \ - && git remote add origin ${PGIS_V1_TIMESCALEDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_TIMESCALEDB_CHECKOUT} \ + && git remote add origin ${PGIS1_TIMESCALEDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_TIMESCALEDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_timescaledb_last_commit.txt \ && ./bootstrap \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_POLICY_DEFAULT_CMP0069=NEW \ \ - -DAPACHE_ONLY=${PGIS_V1_TIMESCALEDB_APACHE_ONLY} \ + -DAPACHE_ONLY=${PGIS1_TIMESCALEDB_APACHE_ONLY} \ -DREGRESS_CHECKS=OFF \ -DSEND_TELEMETRY_DEFAULT=NO \ -DTAP_CHECKS=OFF \ @@ -142,16 +148,22 @@ RUN set -ex \ +FROM builder as builder-mobilitydb + +ARG PGIS1_MOBILITYDB_REPOSITORY +ARG PGIS1_MOBILITYDB_CHECKOUT +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 + # Install MobilityDB RUN set -ex \ && mkdir -p /MobilityDB \ && cd MobilityDB \ && git init \ - && git remote add origin ${PGIS_V1_MOBILITYDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_MOBILITYDB_CHECKOUT} \ + && git remote add origin ${PGIS1_MOBILITYDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_MOBILITYDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_MobilityDB_last_commit.txt \ && mkdir build \ && cd build \ @@ -162,6 +174,9 @@ RUN set -ex \ && make -j$(nproc) \ && make install + +FROM builder as builder-pgxn + RUN pgxn install ddlx RUN pgxn install h3 # https://github.com/zachasme/h3-pg RUN pgxn install json_accessors @@ -177,22 +192,39 @@ RUN pgxn install pgsql_tweaks RUN USE_PGXS=1 pgxn install sqlite_fdw + +FROM builder as builder-other + +ARG PGIS1_PG_HINT_PLAN_REPOSITORY +ARG PGIS1_PG_HINT_PLAN_CHECKOUT +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 + +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install + RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git -#TODO: add https://github.com/hydradatabase/hydra -# https://github.com/powa-team/pg_qualstats -# https://github.com/darold/pgtt -# https://github.com/apache/arrow-flight-sql-postgresql -# https://github.com/neondatabase/pg_embedding/ -# pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken -# -# -------------------------------------------------------------- - - FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -201,7 +233,6 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization -#TODO - uncomment RUN set -ex \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen @@ -296,11 +327,23 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Install from stages +COPY --from=builder-http-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-http-gzip /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-mobilitydb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-mobilitydb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-timescaledb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-timescaledb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-pgxn /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-pgxn /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-other /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-other /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -# Install MobilityDB,Timescaledb,h3,etc from builder -COPY --from=builder /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ -COPY --from=builder /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -COPY --from=builder /postgres_dba /postgres_dba +COPY --from=builder-other /postgres_dba /postgres_dba # check any missing dependencies RUN set -ex \ @@ -318,7 +361,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/15-3.4-bundle0/bookworm/tags b/15-3.4-bundle0/bookworm/tags new file mode 100644 index 00000000..c3e2f82c --- /dev/null +++ b/15-3.4-bundle0/bookworm/tags @@ -0,0 +1 @@ +15-3.4-bundle0-bookworm 15-3.4.0-bundle0-bookworm 15-3.4-bundle0 bundle0 diff --git a/15-3.4/alpine3.18/Dockerfile b/15-3.4/alpine3.18/Dockerfile index 55e41c72..f54ffeac 100644 --- a/15-3.4/alpine3.18/Dockerfile +++ b/15-3.4/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:15-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.0 spatial database extension with PostgreSQL 15 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.0 -ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 +# ENV POSTGIS_VERSION 3.4.0 +# ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/15-master/bookworm/Dockerfile b/15-master/bookworm/Dockerfile index b5ab693e..721c44d2 100644 --- a/15-master/bookworm/Dockerfile +++ b/15-master/bookworm/Dockerfile @@ -6,48 +6,48 @@ # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS_V1_BASE_IMAGE=postgres:15-bookworm +ARG PGIS1_BASE_IMAGE=postgres:15-bookworm -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git -ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git -ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git -ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git -ARG PGIS_V1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git +ARG PGIS1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git +ARG PGIS1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git +ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git +ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git -ARG PGIS_V1_POSTGIS_CHECKOUT=5c3c66a9282b3472bb161f61d1e762789cf4928b -ARG PGIS_V1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 -ARG PGIS_V1_GDAL_CHECKOUT=78d5980666602266a7e532ae5f76ffe1bf70b4ec -ARG PGIS_V1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f -ARG PGIS_V1_SFCGAL_CHECKOUT=35f72d2f52b4253013201b170467757b0fc355e5 -ARG PGIS_V1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c +ARG PGIS1_POSTGIS_CHECKOUT=83fbad6d5213208f4af25a07c9ac2ed20e334ea9 +ARG PGIS1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 +ARG PGIS1_GDAL_CHECKOUT=f3bc13dc4cc4512878852036283eb4d7519bd6c7 +ARG PGIS1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f +ARG PGIS1_SFCGAL_CHECKOUT=34f5a2e5e91a730121128f75d2ef4b55bb8e2afa +ARG PGIS1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c -ARG PGIS_V1_BOOST_VERSION=1.74.0 +ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS_V1_CMAKE_BUILD_TYPE=Release +ARG PGIS1_CMAKE_BUILD_TYPE=Release -FROM ${PGIS_V1_BASE_IMAGE} as builder +FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / -ARG PGIS_V1_BOOST_VERSION -ENV PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ARG PGIS1_BOOST_VERSION +ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -98,42 +98,44 @@ RUN set -ex \ libwebp-dev \ libzstd-dev -ARG PGIS_V1_CMAKE_BUILD_TYPE -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} +ARG PGIS1_CMAKE_BUILD_TYPE +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} + +FROM builder as cgal-sfcgal-builder # cgal & sfcgal -ARG PGIS_V1_SFCGAL_REPOSITORY -ENV PGIS_V1_SFCGAL_REPOSITORY ${PGIS_V1_SFCGAL_REPOSITORY} -ARG PGIS_V1_SFCGAL_CHECKOUT -ENV PGIS_V1_SFCGAL_CHECKOUT ${PGIS_V1_SFCGAL_CHECKOUT} +ARG PGIS1_SFCGAL_REPOSITORY +ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} +ARG PGIS1_SFCGAL_CHECKOUT +ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS_V1_CGAL_REPOSITORY -ENV PGIS_V1_CGAL_REPOSITORY ${PGIS_V1_CGAL_REPOSITORY} -ARG PGIS_V1_CGAL_CHECKOUT -ENV PGIS_V1_CGAL_CHECKOUT ${PGIS_V1_CGAL_CHECKOUT} +ARG PGIS1_CGAL_REPOSITORY +ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} +ARG PGIS1_CGAL_CHECKOUT +ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir cgal \ && cd cgal \ && git init \ - && git remote add origin ${PGIS_V1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_CGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && mkdir SFCGAL \ && cd SFCGAL \ && git init \ - && git remote add origin ${PGIS_V1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_SFCGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_sfcgal_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ && cmake .. \ -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ -DSFCGAL_BUILD_BENCH=OFF \ -DSFCGAL_BUILD_EXAMPLES=OFF \ -DSFCGAL_BUILD_TESTS=OFF \ @@ -144,18 +146,21 @@ RUN set -ex \ && rm -fr /usr/src/SFCGAL \ && rm -fr /usr/src/cgal + +FROM builder as proj-builder + # proj -ARG PGIS_V1_PROJ_REPOSITORY -ENV PGIS_V1_PROJ_REPOSITORY ${PGIS_V1_PROJ_REPOSITORY} -ARG PGIS_V1_PROJ_CHECKOUT -ENV PGIS_V1_PROJ_CHECKOUT ${PGIS_V1_PROJ_CHECKOUT} +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir PROJ \ && cd PROJ \ && git init \ - && git remote add origin ${PGIS_V1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PROJ_CHECKOUT} \ + && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_proj_last_commit.txt \ # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 @@ -172,7 +177,7 @@ RUN set -ex \ && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ ; \ @@ -180,41 +185,55 @@ RUN set -ex \ \ && rm -fr /usr/src/PROJ + +FROM builder as geos-builder + # geos -ARG PGIS_V1_GEOS_REPOSITORY -ENV PGIS_V1_GEOS_REPOSITORY ${PGIS_V1_GEOS_REPOSITORY} -ARG PGIS_V1_GEOS_CHECKOUT -ENV PGIS_V1_GEOS_CHECKOUT ${PGIS_V1_GEOS_CHECKOUT} +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir geos \ && cd geos \ && git init \ - && git remote add origin ${PGIS_V1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GEOS_CHECKOUT} \ + && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_geos_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ && cd / \ && rm -fr /usr/src/geos + +FROM builder as stage0-builder + +COPY --from=cgal-sfcgal-builder /_pgis*.* / +COPY --from=cgal-sfcgal-builder /usr/local /usr/local + +COPY --from=proj-builder /_pgis*.* / +COPY --from=proj-builder /usr/local /usr/local + +COPY --from=geos-builder /_pgis*.* / +COPY --from=geos-builder /usr/local /usr/local # gdal -ARG PGIS_V1_GDAL_REPOSITORY -ENV PGIS_V1_GDAL_REPOSITORY ${PGIS_V1_GDAL_REPOSITORY} -ARG PGIS_V1_GDAL_CHECKOUT -ENV PGIS_V1_GDAL_CHECKOUT ${PGIS_V1_GDAL_CHECKOUT} +ARG PGIS1_GDAL_REPOSITORY +ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} +ARG PGIS1_GDAL_CHECKOUT +ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir gdal \ && cd gdal \ && git init \ - && git remote add origin ${PGIS_V1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GDAL_CHECKOUT} \ + && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_gdal_last_commit.txt \ \ @@ -238,7 +257,7 @@ RUN set -ex \ && mkdir build \ && cd build \ # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ -DBUILD_DOCS=OFF \ \ -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ @@ -292,36 +311,36 @@ RUN set -ex \ && pcre-config --version # ------------------------------------------- -# STAGE final +# final stage # ------------------------------------------- -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ org.opencontainers.image.description="PostGIS - 15-master spatial database extension with PostgreSQL 15 bookworm" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ARG PGIS_V1_CMAKE_BUILD_TYPE -ARG PGIS_V1_BASE_IMAGE -ARG PGIS_V1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE +ARG PGIS1_BOOST_VERSION -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ - PGIS_V1_BASE_IMAGE=${PGIS_V1_BASE_IMAGE} \ - PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ + PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE} \ + PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -347,26 +366,34 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /_pgis*.* / -COPY --from=builder /usr/local /usr/local - -ARG PGIS_V1_GDAL_CHECKOUT -ARG PGIS_V1_GDAL_REPOSITORY -ARG PGIS_V1_GEOS_CHECKOUT -ARG PGIS_V1_GEOS_REPOSITORY -ARG PGIS_V1_PROJ_CHECKOUT -ARG PGIS_V1_PROJ_REPOSITORY -ARG PGIS_V1_SFCGAL_CHECKOUT -ARG PGIS_V1_SFCGAL_REPOSITORY - -ENV PGIS_V1_GDAL_CHECKOUT=${PGIS_V1_GDAL_CHECKOUT} \ - PGIS_V1_GDAL_REPOSITORY=${PGIS_V1_GDAL_REPOSITORY} \ - PGIS_V1_GEOS_CHECKOUT=${PGIS_V1_GEOS_CHECKOUT} \ - PGIS_V1_GEOS_REPOSITORY=${PGIS_V1_GEOS_REPOSITORY} \ - PGIS_V1_PROJ_CHECKOUT=${PGIS_V1_PROJ_CHECKOUT} \ - PGIS_V1_PROJ_REPOSITORY=${PGIS_V1_PROJ_REPOSITORY} \ - PGIS_V1_SFCGAL_CHECKOUT=${PGIS_V1_SFCGAL_CHECKOUT} \ - PGIS_V1_SFCGAL_REPOSITORY=${PGIS_V1_SFCGAL_REPOSITORY} +COPY --from=stage0-builder /_pgis*.* / +COPY --from=stage0-builder /usr/local /usr/local + +ARG PGIS1_GDAL_CHECKOUT +ARG PGIS1_GDAL_REPOSITORY +ARG PGIS1_GEOS_CHECKOUT +ARG PGIS1_GEOS_REPOSITORY +ARG PGIS1_PROJ_CHECKOUT +ARG PGIS1_PROJ_REPOSITORY +ARG PGIS1_SFCGAL_CHECKOUT +ARG PGIS1_SFCGAL_REPOSITORY +ARG PGIS1_CGAL_REPOSITORY +ARG PGIS1_CGAL_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_REPOSITORY + +ENV PGIS1_GDAL_CHECKOUT=${PGIS1_GDAL_CHECKOUT} \ + PGIS1_GDAL_REPOSITORY=${PGIS1_GDAL_REPOSITORY} \ + PGIS1_GEOS_CHECKOUT=${PGIS1_GEOS_CHECKOUT} \ + PGIS1_GEOS_REPOSITORY=${PGIS1_GEOS_REPOSITORY} \ + PGIS1_PROJ_CHECKOUT=${PGIS1_PROJ_CHECKOUT} \ + PGIS1_PROJ_REPOSITORY=${PGIS1_PROJ_REPOSITORY} \ + PGIS1_CGAL_CHECKOUT=${PGIS1_CGAL_CHECKOUT} \ + PGIS1_CGAL_REPOSITORY=${PGIS1_CGAL_REPOSITORY} \ + PGIS1_SFCGAL_CHECKOUT=${PGIS1_SFCGAL_CHECKOUT} \ + PGIS1_SFCGAL_REPOSITORY=${PGIS1_SFCGAL_REPOSITORY} \ + PGIS1_POSTGIS_CHECKOUT=${PGIS1_POSTGIS_CHECKOUT} \ + PGIS1_POSTGIS_REPOSITORY=${PGIS1_POSTGIS_REPOSITORY} # Minimal command line test ( fail fast ) RUN set -ex \ @@ -384,13 +411,6 @@ RUN set -ex \ && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 -# install postgis -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_REPOSITORY - -ENV PGIS_V1_POSTGIS_CHECKOUT=${PGIS_V1_POSTGIS_CHECKOUT} \ - PGIS_V1_POSTGIS_REPOSITORY=${PGIS_V1_POSTGIS_REPOSITORY} - # temporary workaround for : nitdb: invalid locale settings; check LANG and LC_* environment variables # https://github.com/docker-library/postgres/issues/1112#issuecomment-1746076388 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen @@ -433,8 +453,8 @@ RUN set -ex \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_last_commit.txt \ && ./autogen.sh \ diff --git a/16-recentstack/bookworm/Dockerfile b/15-recent/bookworm/Dockerfile similarity index 68% rename from 16-recentstack/bookworm/Dockerfile rename to 15-recent/bookworm/Dockerfile index 0beb6ada..cb9f3fee 100644 --- a/16-recentstack/bookworm/Dockerfile +++ b/15-recent/bookworm/Dockerfile @@ -6,48 +6,48 @@ # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS_V1_BASE_IMAGE=postgres:16-bookworm +ARG PGIS1_BASE_IMAGE=postgres:15-bookworm -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git -ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git -ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git -ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git -ARG PGIS_V1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git +ARG PGIS1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git +ARG PGIS1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git +ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git +ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_GEOS_CHECKOUT=tags/3.12.0 -ARG PGIS_V1_GDAL_CHECKOUT=tags/v3.7.2 -ARG PGIS_V1_PROJ_CHECKOUT=tags/9.3.0 -ARG PGIS_V1_SFCGAL_CHECKOUT=tags/v1.4.1 -ARG PGIS_V1_CGAL_CHECKOUT=tags/v5.6 +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_GEOS_CHECKOUT=tags/3.12.0 +ARG PGIS1_GDAL_CHECKOUT=tags/v3.7.2 +ARG PGIS1_PROJ_CHECKOUT=tags/9.3.0 +ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.4.1 +ARG PGIS1_CGAL_CHECKOUT=tags/v5.6 -ARG PGIS_V1_BOOST_VERSION=1.74.0 +ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS_V1_CMAKE_BUILD_TYPE=Release +ARG PGIS1_CMAKE_BUILD_TYPE=Release -FROM ${PGIS_V1_BASE_IMAGE} as builder +FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / -ARG PGIS_V1_BOOST_VERSION -ENV PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ARG PGIS1_BOOST_VERSION +ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -98,42 +98,44 @@ RUN set -ex \ libwebp-dev \ libzstd-dev -ARG PGIS_V1_CMAKE_BUILD_TYPE -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} +ARG PGIS1_CMAKE_BUILD_TYPE +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} + +FROM builder as cgal-sfcgal-builder # cgal & sfcgal -ARG PGIS_V1_SFCGAL_REPOSITORY -ENV PGIS_V1_SFCGAL_REPOSITORY ${PGIS_V1_SFCGAL_REPOSITORY} -ARG PGIS_V1_SFCGAL_CHECKOUT -ENV PGIS_V1_SFCGAL_CHECKOUT ${PGIS_V1_SFCGAL_CHECKOUT} +ARG PGIS1_SFCGAL_REPOSITORY +ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} +ARG PGIS1_SFCGAL_CHECKOUT +ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS_V1_CGAL_REPOSITORY -ENV PGIS_V1_CGAL_REPOSITORY ${PGIS_V1_CGAL_REPOSITORY} -ARG PGIS_V1_CGAL_CHECKOUT -ENV PGIS_V1_CGAL_CHECKOUT ${PGIS_V1_CGAL_CHECKOUT} +ARG PGIS1_CGAL_REPOSITORY +ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} +ARG PGIS1_CGAL_CHECKOUT +ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir cgal \ && cd cgal \ && git init \ - && git remote add origin ${PGIS_V1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_CGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && mkdir SFCGAL \ && cd SFCGAL \ && git init \ - && git remote add origin ${PGIS_V1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_SFCGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_sfcgal_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ && cmake .. \ -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ -DSFCGAL_BUILD_BENCH=OFF \ -DSFCGAL_BUILD_EXAMPLES=OFF \ -DSFCGAL_BUILD_TESTS=OFF \ @@ -144,18 +146,21 @@ RUN set -ex \ && rm -fr /usr/src/SFCGAL \ && rm -fr /usr/src/cgal + +FROM builder as proj-builder + # proj -ARG PGIS_V1_PROJ_REPOSITORY -ENV PGIS_V1_PROJ_REPOSITORY ${PGIS_V1_PROJ_REPOSITORY} -ARG PGIS_V1_PROJ_CHECKOUT -ENV PGIS_V1_PROJ_CHECKOUT ${PGIS_V1_PROJ_CHECKOUT} +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir PROJ \ && cd PROJ \ && git init \ - && git remote add origin ${PGIS_V1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PROJ_CHECKOUT} \ + && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_proj_last_commit.txt \ # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 @@ -172,7 +177,7 @@ RUN set -ex \ && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ ; \ @@ -180,41 +185,55 @@ RUN set -ex \ \ && rm -fr /usr/src/PROJ + +FROM builder as geos-builder + # geos -ARG PGIS_V1_GEOS_REPOSITORY -ENV PGIS_V1_GEOS_REPOSITORY ${PGIS_V1_GEOS_REPOSITORY} -ARG PGIS_V1_GEOS_CHECKOUT -ENV PGIS_V1_GEOS_CHECKOUT ${PGIS_V1_GEOS_CHECKOUT} +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir geos \ && cd geos \ && git init \ - && git remote add origin ${PGIS_V1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GEOS_CHECKOUT} \ + && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_geos_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ && cd / \ && rm -fr /usr/src/geos + +FROM builder as stage0-builder + +COPY --from=cgal-sfcgal-builder /_pgis*.* / +COPY --from=cgal-sfcgal-builder /usr/local /usr/local + +COPY --from=proj-builder /_pgis*.* / +COPY --from=proj-builder /usr/local /usr/local + +COPY --from=geos-builder /_pgis*.* / +COPY --from=geos-builder /usr/local /usr/local # gdal -ARG PGIS_V1_GDAL_REPOSITORY -ENV PGIS_V1_GDAL_REPOSITORY ${PGIS_V1_GDAL_REPOSITORY} -ARG PGIS_V1_GDAL_CHECKOUT -ENV PGIS_V1_GDAL_CHECKOUT ${PGIS_V1_GDAL_CHECKOUT} +ARG PGIS1_GDAL_REPOSITORY +ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} +ARG PGIS1_GDAL_CHECKOUT +ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir gdal \ && cd gdal \ && git init \ - && git remote add origin ${PGIS_V1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GDAL_CHECKOUT} \ + && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_gdal_last_commit.txt \ \ @@ -238,7 +257,7 @@ RUN set -ex \ && mkdir build \ && cd build \ # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ -DBUILD_DOCS=OFF \ \ -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ @@ -292,36 +311,36 @@ RUN set -ex \ && pcre-config --version # ------------------------------------------- -# STAGE final +# final stage # ------------------------------------------- -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 16-recentstack spatial database extension with PostgreSQL 16 bookworm" \ + org.opencontainers.image.description="PostGIS - 15-recent spatial database extension with PostgreSQL 15 bookworm" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ARG PGIS_V1_CMAKE_BUILD_TYPE -ARG PGIS_V1_BASE_IMAGE -ARG PGIS_V1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE +ARG PGIS1_BOOST_VERSION -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ - PGIS_V1_BASE_IMAGE=${PGIS_V1_BASE_IMAGE} \ - PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ + PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE} \ + PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -347,26 +366,34 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /_pgis*.* / -COPY --from=builder /usr/local /usr/local - -ARG PGIS_V1_GDAL_CHECKOUT -ARG PGIS_V1_GDAL_REPOSITORY -ARG PGIS_V1_GEOS_CHECKOUT -ARG PGIS_V1_GEOS_REPOSITORY -ARG PGIS_V1_PROJ_CHECKOUT -ARG PGIS_V1_PROJ_REPOSITORY -ARG PGIS_V1_SFCGAL_CHECKOUT -ARG PGIS_V1_SFCGAL_REPOSITORY - -ENV PGIS_V1_GDAL_CHECKOUT=${PGIS_V1_GDAL_CHECKOUT} \ - PGIS_V1_GDAL_REPOSITORY=${PGIS_V1_GDAL_REPOSITORY} \ - PGIS_V1_GEOS_CHECKOUT=${PGIS_V1_GEOS_CHECKOUT} \ - PGIS_V1_GEOS_REPOSITORY=${PGIS_V1_GEOS_REPOSITORY} \ - PGIS_V1_PROJ_CHECKOUT=${PGIS_V1_PROJ_CHECKOUT} \ - PGIS_V1_PROJ_REPOSITORY=${PGIS_V1_PROJ_REPOSITORY} \ - PGIS_V1_SFCGAL_CHECKOUT=${PGIS_V1_SFCGAL_CHECKOUT} \ - PGIS_V1_SFCGAL_REPOSITORY=${PGIS_V1_SFCGAL_REPOSITORY} +COPY --from=stage0-builder /_pgis*.* / +COPY --from=stage0-builder /usr/local /usr/local + +ARG PGIS1_GDAL_CHECKOUT +ARG PGIS1_GDAL_REPOSITORY +ARG PGIS1_GEOS_CHECKOUT +ARG PGIS1_GEOS_REPOSITORY +ARG PGIS1_PROJ_CHECKOUT +ARG PGIS1_PROJ_REPOSITORY +ARG PGIS1_SFCGAL_CHECKOUT +ARG PGIS1_SFCGAL_REPOSITORY +ARG PGIS1_CGAL_REPOSITORY +ARG PGIS1_CGAL_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_REPOSITORY + +ENV PGIS1_GDAL_CHECKOUT=${PGIS1_GDAL_CHECKOUT} \ + PGIS1_GDAL_REPOSITORY=${PGIS1_GDAL_REPOSITORY} \ + PGIS1_GEOS_CHECKOUT=${PGIS1_GEOS_CHECKOUT} \ + PGIS1_GEOS_REPOSITORY=${PGIS1_GEOS_REPOSITORY} \ + PGIS1_PROJ_CHECKOUT=${PGIS1_PROJ_CHECKOUT} \ + PGIS1_PROJ_REPOSITORY=${PGIS1_PROJ_REPOSITORY} \ + PGIS1_CGAL_CHECKOUT=${PGIS1_CGAL_CHECKOUT} \ + PGIS1_CGAL_REPOSITORY=${PGIS1_CGAL_REPOSITORY} \ + PGIS1_SFCGAL_CHECKOUT=${PGIS1_SFCGAL_CHECKOUT} \ + PGIS1_SFCGAL_REPOSITORY=${PGIS1_SFCGAL_REPOSITORY} \ + PGIS1_POSTGIS_CHECKOUT=${PGIS1_POSTGIS_CHECKOUT} \ + PGIS1_POSTGIS_REPOSITORY=${PGIS1_POSTGIS_REPOSITORY} # Minimal command line test ( fail fast ) RUN set -ex \ @@ -384,13 +411,6 @@ RUN set -ex \ && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 -# install postgis -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_REPOSITORY - -ENV PGIS_V1_POSTGIS_CHECKOUT=${PGIS_V1_POSTGIS_CHECKOUT} \ - PGIS_V1_POSTGIS_REPOSITORY=${PGIS_V1_POSTGIS_REPOSITORY} - # temporary workaround for : nitdb: invalid locale settings; check LANG and LC_* environment variables # https://github.com/docker-library/postgres/issues/1112#issuecomment-1746076388 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen @@ -433,8 +453,8 @@ RUN set -ex \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_last_commit.txt \ && ./autogen.sh \ diff --git a/15-recentstack/bookworm/initdb-postgis.sh b/15-recent/bookworm/initdb-postgis.sh similarity index 100% rename from 15-recentstack/bookworm/initdb-postgis.sh rename to 15-recent/bookworm/initdb-postgis.sh diff --git a/15-recent/bookworm/tags b/15-recent/bookworm/tags new file mode 100644 index 00000000..34c54866 --- /dev/null +++ b/15-recent/bookworm/tags @@ -0,0 +1 @@ +15-recent-bookworm 15-recent diff --git a/15-recentstack/bookworm/update-postgis.sh b/15-recent/bookworm/update-postgis.sh similarity index 100% rename from 15-recentstack/bookworm/update-postgis.sh rename to 15-recent/bookworm/update-postgis.sh diff --git a/15-recentstack/bookworm/tags b/15-recentstack/bookworm/tags deleted file mode 100644 index faa7a192..00000000 --- a/15-recentstack/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-recentstack-bookworm 15-recentstack diff --git a/16-3.4-bundle/bookworm/tags b/16-3.4-bundle/bookworm/tags deleted file mode 100644 index 83e4de33..00000000 --- a/16-3.4-bundle/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-bundle-bookworm 16-3.4.0-bundle-bookworm 16-3.4-bundle diff --git a/16-3.4-bundle/bookworm/Dockerfile b/16-3.4-bundle0/bookworm/Dockerfile similarity index 61% rename from 16-3.4-bundle/bookworm/Dockerfile rename to 16-3.4-bundle0/bookworm/Dockerfile index 383cc568..ddb45c9b 100644 --- a/16-3.4-bundle/bookworm/Dockerfile +++ b/16-3.4-bundle0/bookworm/Dockerfile @@ -1,6 +1,6 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle.template" +# source: "Dockerfile.bundle0.template" # PLEASE DO NOT EDIT IT DIRECTLY. # @@ -16,26 +16,30 @@ ARG REGISTRY=docker.io ARG REPO_NAME=imresamu ARG IMAGE_NAME=postgis-amd64 -ARG PGIS_V1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm +ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm -ARG PGIS_V1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS_V1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec +ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git +ARG PGIS1_MOBILITYDB_CHECKOUT=tags/v1.1.0-alpha +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=ae74a3f12757a768942c6a38ed774323bcd446ec -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be +ARG PGIS1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git +ARG PGIS1_PGSQL_HTTP_CHECKOUT=tags/v1.6.0 +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1=d0ca28df6121f10cd3868744d219904c7923c5be -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 +ARG PGIS1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git +ARG PGIS1_PGSQL_GZIP_CHECKOUT=tags/v1.0.0 +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1=7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS_V1_TIMESCALEDB_CHECKOUT=tags/2.12.0 -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1=ec99b00f18a6cc636fc7ff6e4bcff870d4201c90 +ARG PGIS1_TIMESCALEDB_APACHE_ONLY=false +ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git +ARG PGIS1_TIMESCALEDB_CHECKOUT=tags/2.12.1-rc1 +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1=c93faddbe95e45d93a53c3f652e2033558e8b380 -FROM ${PGIS_V1_BASE_IMAGE} AS builder +ARG PGIS1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS1_PG_HINT_PLAN_CHECKOUT=tags/REL16_1_6_0 +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=fa0a461af929c06f7c96956369458456c26e7ad9 + +FROM ${PGIS1_BASE_IMAGE} AS builder RUN set -ex \ && apt-get update \ @@ -62,6 +66,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -70,32 +76,25 @@ RUN set -ex \ && rm -rf /var/lib/apt/lists/* -ARG PGIS_V1_MOBILITYDB_REPOSITORY -ARG PGIS_V1_MOBILITYDB_CHECKOUT -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-http-gzip -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_HTTP_REPOSITORY +ARG PGIS1_PGSQL_HTTP_CHECKOUT +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY -ARG PGIS_V1_TIMESCALEDB_REPOSITORY -ARG PGIS_V1_TIMESCALEDB_CHECKOUT -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_GZIP_REPOSITORY +ARG PGIS1_PGSQL_GZIP_CHECKOUT +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1 RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_GZIP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_GZIP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_GZIP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_GZIP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_gzip_last_commit.txt \ && make -j$(nproc) \ && make install @@ -104,29 +103,42 @@ RUN set -ex \ && mkdir -p /pgsql-http \ && cd pgsql-http \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_HTTP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_HTTP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_HTTP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_HTTP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_http_last_commit.txt \ && make -j$(nproc) \ && make install +FROM builder as builder-timescaledb + +ARG PGIS1_TIMESCALEDB_APACHE_ONLY +ARG PGIS1_TIMESCALEDB_REPOSITORY +ARG PGIS1_TIMESCALEDB_CHECKOUT +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1 + # Timescaledb not supported on pg16 yet +FROM builder as builder-mobilitydb + +ARG PGIS1_MOBILITYDB_REPOSITORY +ARG PGIS1_MOBILITYDB_CHECKOUT +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 + # Install MobilityDB RUN set -ex \ && mkdir -p /MobilityDB \ && cd MobilityDB \ && git init \ - && git remote add origin ${PGIS_V1_MOBILITYDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_MOBILITYDB_CHECKOUT} \ + && git remote add origin ${PGIS1_MOBILITYDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_MOBILITYDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_MobilityDB_last_commit.txt \ && mkdir build \ && cd build \ @@ -137,6 +149,9 @@ RUN set -ex \ && make -j$(nproc) \ && make install + +FROM builder as builder-pgxn + RUN pgxn install ddlx RUN pgxn install h3 # https://github.com/zachasme/h3-pg RUN pgxn install json_accessors @@ -153,22 +168,33 @@ RUN pgxn install pgsql_tweaks # sqlite_fdw not supported on pg16 yet # RUN USE_PGXS=1 pgxn install sqlite_fdw + +FROM builder as builder-other + +ARG PGIS1_PG_HINT_PLAN_REPOSITORY +ARG PGIS1_PG_HINT_PLAN_CHECKOUT +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 + +# PG16 + hydra not supperted https://github.com/hydradatabase/hydra + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install + RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git -#TODO: add https://github.com/hydradatabase/hydra -# https://github.com/powa-team/pg_qualstats -# https://github.com/darold/pgtt -# https://github.com/apache/arrow-flight-sql-postgresql -# https://github.com/neondatabase/pg_embedding/ -# pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken -# -# -------------------------------------------------------------- - - FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -177,7 +203,6 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization -#TODO - uncomment RUN set -ex \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen @@ -275,11 +300,23 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Install from stages +COPY --from=builder-http-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-http-gzip /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-mobilitydb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-mobilitydb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-timescaledb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-timescaledb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-pgxn /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-pgxn /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-other /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-other /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -# Install MobilityDB,Timescaledb,h3,etc from builder -COPY --from=builder /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ -COPY --from=builder /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -COPY --from=builder /postgres_dba /postgres_dba +COPY --from=builder-other /postgres_dba /postgres_dba # check any missing dependencies RUN set -ex \ @@ -297,7 +334,7 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ # add MobilityDB requirements; ( TimescaleDB not yet supported on pg16 ) - echo "shared_preload_libraries = 'postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ echo "timescaledb.telemetry_level=off" >> /usr/share/postgresql/postgresql.conf.sample diff --git a/16-3.4-bundle0/bookworm/tags b/16-3.4-bundle0/bookworm/tags new file mode 100644 index 00000000..451463d9 --- /dev/null +++ b/16-3.4-bundle0/bookworm/tags @@ -0,0 +1 @@ +16-3.4-bundle0-bookworm 16-3.4.0-bundle0-bookworm 16-3.4-bundle0 diff --git a/16-3.4/alpine3.18/Dockerfile b/16-3.4/alpine3.18/Dockerfile index e688555e..a599fe95 100644 --- a/16-3.4/alpine3.18/Dockerfile +++ b/16-3.4/alpine3.18/Dockerfile @@ -4,23 +4,23 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -ARG PGIS_V1_BASE_IMAGE=postgres:16-alpine3.18 -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.18 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=0874ea342af5392e3cd9f4e6157ef08648c9d2d8 -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.0 spatial database extension with PostgreSQL 16 alpine3.18" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.18" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.0 -ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 +# ENV POSTGIS_VERSION 3.4.0 +# ENV POSTGIS_SHA256 3acdf303adfd58d73543a70e6ebe99af29301262c56cf32220d42caa3efab024 RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -75,11 +75,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/16-master/bookworm/Dockerfile b/16-master/bookworm/Dockerfile index 1aa8bb97..bc57a185 100644 --- a/16-master/bookworm/Dockerfile +++ b/16-master/bookworm/Dockerfile @@ -6,48 +6,48 @@ # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS_V1_BASE_IMAGE=postgres:16-bookworm +ARG PGIS1_BASE_IMAGE=postgres:16-bookworm -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git -ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git -ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git -ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git -ARG PGIS_V1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git +ARG PGIS1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git +ARG PGIS1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git +ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git +ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git -ARG PGIS_V1_POSTGIS_CHECKOUT=5c3c66a9282b3472bb161f61d1e762789cf4928b -ARG PGIS_V1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 -ARG PGIS_V1_GDAL_CHECKOUT=78d5980666602266a7e532ae5f76ffe1bf70b4ec -ARG PGIS_V1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f -ARG PGIS_V1_SFCGAL_CHECKOUT=35f72d2f52b4253013201b170467757b0fc355e5 -ARG PGIS_V1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c +ARG PGIS1_POSTGIS_CHECKOUT=83fbad6d5213208f4af25a07c9ac2ed20e334ea9 +ARG PGIS1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 +ARG PGIS1_GDAL_CHECKOUT=f3bc13dc4cc4512878852036283eb4d7519bd6c7 +ARG PGIS1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f +ARG PGIS1_SFCGAL_CHECKOUT=34f5a2e5e91a730121128f75d2ef4b55bb8e2afa +ARG PGIS1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c -ARG PGIS_V1_BOOST_VERSION=1.74.0 +ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS_V1_CMAKE_BUILD_TYPE=Release +ARG PGIS1_CMAKE_BUILD_TYPE=Release -FROM ${PGIS_V1_BASE_IMAGE} as builder +FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / -ARG PGIS_V1_BOOST_VERSION -ENV PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ARG PGIS1_BOOST_VERSION +ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -98,42 +98,44 @@ RUN set -ex \ libwebp-dev \ libzstd-dev -ARG PGIS_V1_CMAKE_BUILD_TYPE -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} +ARG PGIS1_CMAKE_BUILD_TYPE +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} + +FROM builder as cgal-sfcgal-builder # cgal & sfcgal -ARG PGIS_V1_SFCGAL_REPOSITORY -ENV PGIS_V1_SFCGAL_REPOSITORY ${PGIS_V1_SFCGAL_REPOSITORY} -ARG PGIS_V1_SFCGAL_CHECKOUT -ENV PGIS_V1_SFCGAL_CHECKOUT ${PGIS_V1_SFCGAL_CHECKOUT} +ARG PGIS1_SFCGAL_REPOSITORY +ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} +ARG PGIS1_SFCGAL_CHECKOUT +ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS_V1_CGAL_REPOSITORY -ENV PGIS_V1_CGAL_REPOSITORY ${PGIS_V1_CGAL_REPOSITORY} -ARG PGIS_V1_CGAL_CHECKOUT -ENV PGIS_V1_CGAL_CHECKOUT ${PGIS_V1_CGAL_CHECKOUT} +ARG PGIS1_CGAL_REPOSITORY +ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} +ARG PGIS1_CGAL_CHECKOUT +ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir cgal \ && cd cgal \ && git init \ - && git remote add origin ${PGIS_V1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_CGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && mkdir SFCGAL \ && cd SFCGAL \ && git init \ - && git remote add origin ${PGIS_V1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_SFCGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_sfcgal_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ && cmake .. \ -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ -DSFCGAL_BUILD_BENCH=OFF \ -DSFCGAL_BUILD_EXAMPLES=OFF \ -DSFCGAL_BUILD_TESTS=OFF \ @@ -144,18 +146,21 @@ RUN set -ex \ && rm -fr /usr/src/SFCGAL \ && rm -fr /usr/src/cgal + +FROM builder as proj-builder + # proj -ARG PGIS_V1_PROJ_REPOSITORY -ENV PGIS_V1_PROJ_REPOSITORY ${PGIS_V1_PROJ_REPOSITORY} -ARG PGIS_V1_PROJ_CHECKOUT -ENV PGIS_V1_PROJ_CHECKOUT ${PGIS_V1_PROJ_CHECKOUT} +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir PROJ \ && cd PROJ \ && git init \ - && git remote add origin ${PGIS_V1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PROJ_CHECKOUT} \ + && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_proj_last_commit.txt \ # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 @@ -172,7 +177,7 @@ RUN set -ex \ && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ ; \ @@ -180,41 +185,55 @@ RUN set -ex \ \ && rm -fr /usr/src/PROJ + +FROM builder as geos-builder + # geos -ARG PGIS_V1_GEOS_REPOSITORY -ENV PGIS_V1_GEOS_REPOSITORY ${PGIS_V1_GEOS_REPOSITORY} -ARG PGIS_V1_GEOS_CHECKOUT -ENV PGIS_V1_GEOS_CHECKOUT ${PGIS_V1_GEOS_CHECKOUT} +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir geos \ && cd geos \ && git init \ - && git remote add origin ${PGIS_V1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GEOS_CHECKOUT} \ + && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_geos_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ && cd / \ && rm -fr /usr/src/geos + +FROM builder as stage0-builder + +COPY --from=cgal-sfcgal-builder /_pgis*.* / +COPY --from=cgal-sfcgal-builder /usr/local /usr/local + +COPY --from=proj-builder /_pgis*.* / +COPY --from=proj-builder /usr/local /usr/local + +COPY --from=geos-builder /_pgis*.* / +COPY --from=geos-builder /usr/local /usr/local # gdal -ARG PGIS_V1_GDAL_REPOSITORY -ENV PGIS_V1_GDAL_REPOSITORY ${PGIS_V1_GDAL_REPOSITORY} -ARG PGIS_V1_GDAL_CHECKOUT -ENV PGIS_V1_GDAL_CHECKOUT ${PGIS_V1_GDAL_CHECKOUT} +ARG PGIS1_GDAL_REPOSITORY +ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} +ARG PGIS1_GDAL_CHECKOUT +ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir gdal \ && cd gdal \ && git init \ - && git remote add origin ${PGIS_V1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GDAL_CHECKOUT} \ + && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_gdal_last_commit.txt \ \ @@ -238,7 +257,7 @@ RUN set -ex \ && mkdir build \ && cd build \ # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ -DBUILD_DOCS=OFF \ \ -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ @@ -292,36 +311,36 @@ RUN set -ex \ && pcre-config --version # ------------------------------------------- -# STAGE final +# final stage # ------------------------------------------- -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ org.opencontainers.image.description="PostGIS - 16-master spatial database extension with PostgreSQL 16 bookworm" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ARG PGIS_V1_CMAKE_BUILD_TYPE -ARG PGIS_V1_BASE_IMAGE -ARG PGIS_V1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE +ARG PGIS1_BOOST_VERSION -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ - PGIS_V1_BASE_IMAGE=${PGIS_V1_BASE_IMAGE} \ - PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ + PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE} \ + PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -347,26 +366,34 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /_pgis*.* / -COPY --from=builder /usr/local /usr/local - -ARG PGIS_V1_GDAL_CHECKOUT -ARG PGIS_V1_GDAL_REPOSITORY -ARG PGIS_V1_GEOS_CHECKOUT -ARG PGIS_V1_GEOS_REPOSITORY -ARG PGIS_V1_PROJ_CHECKOUT -ARG PGIS_V1_PROJ_REPOSITORY -ARG PGIS_V1_SFCGAL_CHECKOUT -ARG PGIS_V1_SFCGAL_REPOSITORY - -ENV PGIS_V1_GDAL_CHECKOUT=${PGIS_V1_GDAL_CHECKOUT} \ - PGIS_V1_GDAL_REPOSITORY=${PGIS_V1_GDAL_REPOSITORY} \ - PGIS_V1_GEOS_CHECKOUT=${PGIS_V1_GEOS_CHECKOUT} \ - PGIS_V1_GEOS_REPOSITORY=${PGIS_V1_GEOS_REPOSITORY} \ - PGIS_V1_PROJ_CHECKOUT=${PGIS_V1_PROJ_CHECKOUT} \ - PGIS_V1_PROJ_REPOSITORY=${PGIS_V1_PROJ_REPOSITORY} \ - PGIS_V1_SFCGAL_CHECKOUT=${PGIS_V1_SFCGAL_CHECKOUT} \ - PGIS_V1_SFCGAL_REPOSITORY=${PGIS_V1_SFCGAL_REPOSITORY} +COPY --from=stage0-builder /_pgis*.* / +COPY --from=stage0-builder /usr/local /usr/local + +ARG PGIS1_GDAL_CHECKOUT +ARG PGIS1_GDAL_REPOSITORY +ARG PGIS1_GEOS_CHECKOUT +ARG PGIS1_GEOS_REPOSITORY +ARG PGIS1_PROJ_CHECKOUT +ARG PGIS1_PROJ_REPOSITORY +ARG PGIS1_SFCGAL_CHECKOUT +ARG PGIS1_SFCGAL_REPOSITORY +ARG PGIS1_CGAL_REPOSITORY +ARG PGIS1_CGAL_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_REPOSITORY + +ENV PGIS1_GDAL_CHECKOUT=${PGIS1_GDAL_CHECKOUT} \ + PGIS1_GDAL_REPOSITORY=${PGIS1_GDAL_REPOSITORY} \ + PGIS1_GEOS_CHECKOUT=${PGIS1_GEOS_CHECKOUT} \ + PGIS1_GEOS_REPOSITORY=${PGIS1_GEOS_REPOSITORY} \ + PGIS1_PROJ_CHECKOUT=${PGIS1_PROJ_CHECKOUT} \ + PGIS1_PROJ_REPOSITORY=${PGIS1_PROJ_REPOSITORY} \ + PGIS1_CGAL_CHECKOUT=${PGIS1_CGAL_CHECKOUT} \ + PGIS1_CGAL_REPOSITORY=${PGIS1_CGAL_REPOSITORY} \ + PGIS1_SFCGAL_CHECKOUT=${PGIS1_SFCGAL_CHECKOUT} \ + PGIS1_SFCGAL_REPOSITORY=${PGIS1_SFCGAL_REPOSITORY} \ + PGIS1_POSTGIS_CHECKOUT=${PGIS1_POSTGIS_CHECKOUT} \ + PGIS1_POSTGIS_REPOSITORY=${PGIS1_POSTGIS_REPOSITORY} # Minimal command line test ( fail fast ) RUN set -ex \ @@ -384,13 +411,6 @@ RUN set -ex \ && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 -# install postgis -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_REPOSITORY - -ENV PGIS_V1_POSTGIS_CHECKOUT=${PGIS_V1_POSTGIS_CHECKOUT} \ - PGIS_V1_POSTGIS_REPOSITORY=${PGIS_V1_POSTGIS_REPOSITORY} - # temporary workaround for : nitdb: invalid locale settings; check LANG and LC_* environment variables # https://github.com/docker-library/postgres/issues/1112#issuecomment-1746076388 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen @@ -433,8 +453,8 @@ RUN set -ex \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_last_commit.txt \ && ./autogen.sh \ diff --git a/15-recentstack/bookworm/Dockerfile b/16-recent/bookworm/Dockerfile similarity index 68% rename from 15-recentstack/bookworm/Dockerfile rename to 16-recent/bookworm/Dockerfile index 20425041..84122812 100644 --- a/15-recentstack/bookworm/Dockerfile +++ b/16-recent/bookworm/Dockerfile @@ -6,48 +6,48 @@ # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS_V1_BASE_IMAGE=postgres:15-bookworm +ARG PGIS1_BASE_IMAGE=postgres:16-bookworm -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git -ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git -ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git -ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git -ARG PGIS_V1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git +ARG PGIS1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git +ARG PGIS1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git +ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git +ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git -ARG PGIS_V1_POSTGIS_CHECKOUT=tags/3.4.0 -ARG PGIS_V1_GEOS_CHECKOUT=tags/3.12.0 -ARG PGIS_V1_GDAL_CHECKOUT=tags/v3.7.2 -ARG PGIS_V1_PROJ_CHECKOUT=tags/9.3.0 -ARG PGIS_V1_SFCGAL_CHECKOUT=tags/v1.4.1 -ARG PGIS_V1_CGAL_CHECKOUT=tags/v5.6 +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.0 +ARG PGIS1_GEOS_CHECKOUT=tags/3.12.0 +ARG PGIS1_GDAL_CHECKOUT=tags/v3.7.2 +ARG PGIS1_PROJ_CHECKOUT=tags/9.3.0 +ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.4.1 +ARG PGIS1_CGAL_CHECKOUT=tags/v5.6 -ARG PGIS_V1_BOOST_VERSION=1.74.0 +ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS_V1_CMAKE_BUILD_TYPE=Release +ARG PGIS1_CMAKE_BUILD_TYPE=Release -FROM ${PGIS_V1_BASE_IMAGE} as builder +FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / -ARG PGIS_V1_BOOST_VERSION -ENV PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ARG PGIS1_BOOST_VERSION +ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -98,42 +98,44 @@ RUN set -ex \ libwebp-dev \ libzstd-dev -ARG PGIS_V1_CMAKE_BUILD_TYPE -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} +ARG PGIS1_CMAKE_BUILD_TYPE +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} + +FROM builder as cgal-sfcgal-builder # cgal & sfcgal -ARG PGIS_V1_SFCGAL_REPOSITORY -ENV PGIS_V1_SFCGAL_REPOSITORY ${PGIS_V1_SFCGAL_REPOSITORY} -ARG PGIS_V1_SFCGAL_CHECKOUT -ENV PGIS_V1_SFCGAL_CHECKOUT ${PGIS_V1_SFCGAL_CHECKOUT} +ARG PGIS1_SFCGAL_REPOSITORY +ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} +ARG PGIS1_SFCGAL_CHECKOUT +ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS_V1_CGAL_REPOSITORY -ENV PGIS_V1_CGAL_REPOSITORY ${PGIS_V1_CGAL_REPOSITORY} -ARG PGIS_V1_CGAL_CHECKOUT -ENV PGIS_V1_CGAL_CHECKOUT ${PGIS_V1_CGAL_CHECKOUT} +ARG PGIS1_CGAL_REPOSITORY +ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} +ARG PGIS1_CGAL_CHECKOUT +ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir cgal \ && cd cgal \ && git init \ - && git remote add origin ${PGIS_V1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_CGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && mkdir SFCGAL \ && cd SFCGAL \ && git init \ - && git remote add origin ${PGIS_V1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_SFCGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_sfcgal_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ && cmake .. \ -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ -DSFCGAL_BUILD_BENCH=OFF \ -DSFCGAL_BUILD_EXAMPLES=OFF \ -DSFCGAL_BUILD_TESTS=OFF \ @@ -144,18 +146,21 @@ RUN set -ex \ && rm -fr /usr/src/SFCGAL \ && rm -fr /usr/src/cgal + +FROM builder as proj-builder + # proj -ARG PGIS_V1_PROJ_REPOSITORY -ENV PGIS_V1_PROJ_REPOSITORY ${PGIS_V1_PROJ_REPOSITORY} -ARG PGIS_V1_PROJ_CHECKOUT -ENV PGIS_V1_PROJ_CHECKOUT ${PGIS_V1_PROJ_CHECKOUT} +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir PROJ \ && cd PROJ \ && git init \ - && git remote add origin ${PGIS_V1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PROJ_CHECKOUT} \ + && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_proj_last_commit.txt \ # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 @@ -172,7 +177,7 @@ RUN set -ex \ && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ ; \ @@ -180,41 +185,55 @@ RUN set -ex \ \ && rm -fr /usr/src/PROJ + +FROM builder as geos-builder + # geos -ARG PGIS_V1_GEOS_REPOSITORY -ENV PGIS_V1_GEOS_REPOSITORY ${PGIS_V1_GEOS_REPOSITORY} -ARG PGIS_V1_GEOS_CHECKOUT -ENV PGIS_V1_GEOS_CHECKOUT ${PGIS_V1_GEOS_CHECKOUT} +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir geos \ && cd geos \ && git init \ - && git remote add origin ${PGIS_V1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GEOS_CHECKOUT} \ + && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_geos_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ && cd / \ && rm -fr /usr/src/geos + +FROM builder as stage0-builder + +COPY --from=cgal-sfcgal-builder /_pgis*.* / +COPY --from=cgal-sfcgal-builder /usr/local /usr/local + +COPY --from=proj-builder /_pgis*.* / +COPY --from=proj-builder /usr/local /usr/local + +COPY --from=geos-builder /_pgis*.* / +COPY --from=geos-builder /usr/local /usr/local # gdal -ARG PGIS_V1_GDAL_REPOSITORY -ENV PGIS_V1_GDAL_REPOSITORY ${PGIS_V1_GDAL_REPOSITORY} -ARG PGIS_V1_GDAL_CHECKOUT -ENV PGIS_V1_GDAL_CHECKOUT ${PGIS_V1_GDAL_CHECKOUT} +ARG PGIS1_GDAL_REPOSITORY +ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} +ARG PGIS1_GDAL_CHECKOUT +ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir gdal \ && cd gdal \ && git init \ - && git remote add origin ${PGIS_V1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GDAL_CHECKOUT} \ + && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_gdal_last_commit.txt \ \ @@ -238,7 +257,7 @@ RUN set -ex \ && mkdir build \ && cd build \ # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ -DBUILD_DOCS=OFF \ \ -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ @@ -292,36 +311,36 @@ RUN set -ex \ && pcre-config --version # ------------------------------------------- -# STAGE final +# final stage # ------------------------------------------- -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 15-recentstack spatial database extension with PostgreSQL 15 bookworm" \ + org.opencontainers.image.description="PostGIS - 16-recent spatial database extension with PostgreSQL 16 bookworm" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ARG PGIS_V1_CMAKE_BUILD_TYPE -ARG PGIS_V1_BASE_IMAGE -ARG PGIS_V1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE +ARG PGIS1_BOOST_VERSION -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ - PGIS_V1_BASE_IMAGE=${PGIS_V1_BASE_IMAGE} \ - PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ + PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE} \ + PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -347,26 +366,34 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /_pgis*.* / -COPY --from=builder /usr/local /usr/local - -ARG PGIS_V1_GDAL_CHECKOUT -ARG PGIS_V1_GDAL_REPOSITORY -ARG PGIS_V1_GEOS_CHECKOUT -ARG PGIS_V1_GEOS_REPOSITORY -ARG PGIS_V1_PROJ_CHECKOUT -ARG PGIS_V1_PROJ_REPOSITORY -ARG PGIS_V1_SFCGAL_CHECKOUT -ARG PGIS_V1_SFCGAL_REPOSITORY - -ENV PGIS_V1_GDAL_CHECKOUT=${PGIS_V1_GDAL_CHECKOUT} \ - PGIS_V1_GDAL_REPOSITORY=${PGIS_V1_GDAL_REPOSITORY} \ - PGIS_V1_GEOS_CHECKOUT=${PGIS_V1_GEOS_CHECKOUT} \ - PGIS_V1_GEOS_REPOSITORY=${PGIS_V1_GEOS_REPOSITORY} \ - PGIS_V1_PROJ_CHECKOUT=${PGIS_V1_PROJ_CHECKOUT} \ - PGIS_V1_PROJ_REPOSITORY=${PGIS_V1_PROJ_REPOSITORY} \ - PGIS_V1_SFCGAL_CHECKOUT=${PGIS_V1_SFCGAL_CHECKOUT} \ - PGIS_V1_SFCGAL_REPOSITORY=${PGIS_V1_SFCGAL_REPOSITORY} +COPY --from=stage0-builder /_pgis*.* / +COPY --from=stage0-builder /usr/local /usr/local + +ARG PGIS1_GDAL_CHECKOUT +ARG PGIS1_GDAL_REPOSITORY +ARG PGIS1_GEOS_CHECKOUT +ARG PGIS1_GEOS_REPOSITORY +ARG PGIS1_PROJ_CHECKOUT +ARG PGIS1_PROJ_REPOSITORY +ARG PGIS1_SFCGAL_CHECKOUT +ARG PGIS1_SFCGAL_REPOSITORY +ARG PGIS1_CGAL_REPOSITORY +ARG PGIS1_CGAL_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_REPOSITORY + +ENV PGIS1_GDAL_CHECKOUT=${PGIS1_GDAL_CHECKOUT} \ + PGIS1_GDAL_REPOSITORY=${PGIS1_GDAL_REPOSITORY} \ + PGIS1_GEOS_CHECKOUT=${PGIS1_GEOS_CHECKOUT} \ + PGIS1_GEOS_REPOSITORY=${PGIS1_GEOS_REPOSITORY} \ + PGIS1_PROJ_CHECKOUT=${PGIS1_PROJ_CHECKOUT} \ + PGIS1_PROJ_REPOSITORY=${PGIS1_PROJ_REPOSITORY} \ + PGIS1_CGAL_CHECKOUT=${PGIS1_CGAL_CHECKOUT} \ + PGIS1_CGAL_REPOSITORY=${PGIS1_CGAL_REPOSITORY} \ + PGIS1_SFCGAL_CHECKOUT=${PGIS1_SFCGAL_CHECKOUT} \ + PGIS1_SFCGAL_REPOSITORY=${PGIS1_SFCGAL_REPOSITORY} \ + PGIS1_POSTGIS_CHECKOUT=${PGIS1_POSTGIS_CHECKOUT} \ + PGIS1_POSTGIS_REPOSITORY=${PGIS1_POSTGIS_REPOSITORY} # Minimal command line test ( fail fast ) RUN set -ex \ @@ -384,13 +411,6 @@ RUN set -ex \ && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 -# install postgis -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_REPOSITORY - -ENV PGIS_V1_POSTGIS_CHECKOUT=${PGIS_V1_POSTGIS_CHECKOUT} \ - PGIS_V1_POSTGIS_REPOSITORY=${PGIS_V1_POSTGIS_REPOSITORY} - # temporary workaround for : nitdb: invalid locale settings; check LANG and LC_* environment variables # https://github.com/docker-library/postgres/issues/1112#issuecomment-1746076388 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen @@ -433,8 +453,8 @@ RUN set -ex \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_last_commit.txt \ && ./autogen.sh \ diff --git a/16-recentstack/bookworm/initdb-postgis.sh b/16-recent/bookworm/initdb-postgis.sh similarity index 100% rename from 16-recentstack/bookworm/initdb-postgis.sh rename to 16-recent/bookworm/initdb-postgis.sh diff --git a/16-recent/bookworm/tags b/16-recent/bookworm/tags new file mode 100644 index 00000000..fc0f1d47 --- /dev/null +++ b/16-recent/bookworm/tags @@ -0,0 +1 @@ +16-recent-bookworm 16-recent diff --git a/16-recentstack/bookworm/update-postgis.sh b/16-recent/bookworm/update-postgis.sh similarity index 100% rename from 16-recentstack/bookworm/update-postgis.sh rename to 16-recent/bookworm/update-postgis.sh diff --git a/16-recentstack/bookworm/tags b/16-recentstack/bookworm/tags deleted file mode 100644 index ee11770c..00000000 --- a/16-recentstack/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -16-recentstack-bookworm 16-recentstack diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template index 61e55f15..ba423e99 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -1,21 +1,21 @@ -ARG PGIS_V1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_POSTGIS_CHECKOUT={{ .[env.variant].POSTGIS_CHECKOUT }} -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1={{ .[env.variant].POSTGIS_CHECKOUT_SHA1 }} +ARG PGIS1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT={{ .[env.variant].POSTGIS_CHECKOUT }} +ARG PGIS1_POSTGIS_CHECKOUT_SHA1={{ .[env.variant].POSTGIS_CHECKOUT_SHA1 }} -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} -ARG PGIS_V1_POSTGIS_REPOSITORY -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS {{ .[env.variant].POSTGIS_VERSION }} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION {{ .[env.variant].POSTGIS_VERSION }} -ENV POSTGIS_SHA256 {{ .[env.variant].POSTGIS_SHA256 }} +# ENV POSTGIS_VERSION {{ .[env.variant].POSTGIS_VERSION }} +# ENV POSTGIS_SHA256 {{ .[env.variant].POSTGIS_SHA256 }} RUN set -eux \ # && apk add --no-cache --virtual .fetch-deps \ @@ -70,11 +70,11 @@ RUN set -eux \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgis_last_commit.txt \ # build PostGIS - with Link Time Optimization (LTO) enabled && cd /usr/src/postgis \ diff --git a/Dockerfile.bundle.template b/Dockerfile.bundle0.template similarity index 61% rename from Dockerfile.bundle.template rename to Dockerfile.bundle0.template index 4a2cc2c2..b696698a 100644 --- a/Dockerfile.bundle.template +++ b/Dockerfile.bundle0.template @@ -11,26 +11,30 @@ ARG REGISTRY={{ env.REGISTRY }} ARG REPO_NAME={{ env.REPO_NAME }} ARG IMAGE_NAME={{ env.IMAGE_NAME }} -ARG PGIS_V1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} +ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} -ARG PGIS_V1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS_V1_MOBILITYDB_CHECKOUT={{ .[env.variant].MOBILITYDB_CHECKOUT }} -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1={{ .[env.variant].MOBILITYDB_CHECKOUT_SHA1 }} +ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git +ARG PGIS1_MOBILITYDB_CHECKOUT={{ .[env.variant].MOBILITYDB_CHECKOUT }} +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1={{ .[env.variant].MOBILITYDB_CHECKOUT_SHA1 }} -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT={{ .[env.variant].PGSQL_HTTP_CHECKOUT }} -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1={{ .[env.variant].PGSQL_HTTP_CHECKOUT_SHA1 }} +ARG PGIS1_PGSQL_HTTP_REPOSITORY=https://github.com/pramsey/pgsql-http.git +ARG PGIS1_PGSQL_HTTP_CHECKOUT={{ .[env.variant].PGSQL_HTTP_CHECKOUT }} +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1={{ .[env.variant].PGSQL_HTTP_CHECKOUT_SHA1 }} -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT={{ .[env.variant].PGSQL_GZIP_CHECKOUT }} -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1={{ .[env.variant].PGSQL_GZIP_CHECKOUT_SHA1 }} +ARG PGIS1_PGSQL_GZIP_REPOSITORY=https://github.com/pramsey/pgsql-gzip.git +ARG PGIS1_PGSQL_GZIP_CHECKOUT={{ .[env.variant].PGSQL_GZIP_CHECKOUT }} +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1={{ .[env.variant].PGSQL_GZIP_CHECKOUT_SHA1 }} -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS_V1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS_V1_TIMESCALEDB_CHECKOUT={{ .[env.variant].TIMESCALEDB_CHECKOUT }} -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1={{ .[env.variant].TIMESCALEDB_CHECKOUT_SHA1 }} +ARG PGIS1_TIMESCALEDB_APACHE_ONLY=false +ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git +ARG PGIS1_TIMESCALEDB_CHECKOUT={{ .[env.variant].TIMESCALEDB_CHECKOUT }} +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1={{ .[env.variant].TIMESCALEDB_CHECKOUT_SHA1 }} -FROM ${PGIS_V1_BASE_IMAGE} AS builder +ARG PGIS1_PG_HINT_PLAN_REPOSITORY=https://github.com/ossc-db/pg_hint_plan.git +ARG PGIS1_PG_HINT_PLAN_CHECKOUT={{ .[env.variant].PG_HINT_PLAN_CHECKOUT }} +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1={{ .[env.variant].PG_HINT_PLAN_CHECKOUT_SHA1 }} + +FROM ${PGIS1_BASE_IMAGE} AS builder RUN set -ex \ && apt-get update \ @@ -57,6 +61,8 @@ RUN set -ex \ libkrb5-dev \ # pgsql-http libcurl4-gnutls-dev \ + # hydra (columnar) + liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw @@ -65,32 +71,25 @@ RUN set -ex \ && rm -rf /var/lib/apt/lists/* -ARG PGIS_V1_MOBILITYDB_REPOSITORY -ARG PGIS_V1_MOBILITYDB_CHECKOUT -ARG PGIS_V1_MOBILITYDB_CHECKOUT_SHA1 - -ARG PGIS_V1_PGSQL_HTTP_REPOSITORY -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT -ARG PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-http-gzip -ARG PGIS_V1_PGSQL_GZIP_REPOSITORY -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT -ARG PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_HTTP_REPOSITORY +ARG PGIS1_PGSQL_HTTP_CHECKOUT +ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 -ARG PGIS_V1_TIMESCALEDB_APACHE_ONLY -ARG PGIS_V1_TIMESCALEDB_REPOSITORY -ARG PGIS_V1_TIMESCALEDB_CHECKOUT -ARG PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1 +ARG PGIS1_PGSQL_GZIP_REPOSITORY +ARG PGIS1_PGSQL_GZIP_CHECKOUT +ARG PGIS1_PGSQL_GZIP_CHECKOUT_SHA1 RUN set -ex \ && mkdir -p /pgsql-gzip \ && cd pgsql-gzip \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_GZIP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_GZIP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_GZIP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_GZIP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_GZIP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_gzip_last_commit.txt \ && make -j$(nproc) \ && make install @@ -99,16 +98,23 @@ RUN set -ex \ && mkdir -p /pgsql-http \ && cd pgsql-http \ && git init \ - && git remote add origin ${PGIS_V1_PGSQL_HTTP_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PGSQL_HTTP_CHECKOUT} \ + && git remote add origin ${PGIS1_PGSQL_HTTP_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PGSQL_HTTP_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PGSQL_HTTP_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_pgsql_http_last_commit.txt \ && make -j$(nproc) \ && make install +FROM builder as builder-timescaledb + +ARG PGIS1_TIMESCALEDB_APACHE_ONLY +ARG PGIS1_TIMESCALEDB_REPOSITORY +ARG PGIS1_TIMESCALEDB_CHECKOUT +ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1 + {{ if env.version | startswith("16") then ( -}} # Timescaledb not supported on pg16 yet {{ ) else ( -}} @@ -117,18 +123,18 @@ RUN set -ex \ && mkdir -p /timescaledb \ && cd timescaledb \ && git init \ - && git remote add origin ${PGIS_V1_TIMESCALEDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_TIMESCALEDB_CHECKOUT} \ + && git remote add origin ${PGIS1_TIMESCALEDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_TIMESCALEDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_TIMESCALEDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_timescaledb_last_commit.txt \ && ./bootstrap \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_POLICY_DEFAULT_CMP0069=NEW \ \ - -DAPACHE_ONLY=${PGIS_V1_TIMESCALEDB_APACHE_ONLY} \ + -DAPACHE_ONLY=${PGIS1_TIMESCALEDB_APACHE_ONLY} \ -DREGRESS_CHECKS=OFF \ -DSEND_TELEMETRY_DEFAULT=NO \ -DTAP_CHECKS=OFF \ @@ -141,16 +147,22 @@ RUN set -ex \ {{ ) end -}} +FROM builder as builder-mobilitydb + +ARG PGIS1_MOBILITYDB_REPOSITORY +ARG PGIS1_MOBILITYDB_CHECKOUT +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 + # Install MobilityDB RUN set -ex \ && mkdir -p /MobilityDB \ && cd MobilityDB \ && git init \ - && git remote add origin ${PGIS_V1_MOBILITYDB_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_MOBILITYDB_CHECKOUT} \ + && git remote add origin ${PGIS1_MOBILITYDB_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_MOBILITYDB_CHECKOUT} \ && git checkout FETCH_HEAD \ # Verify that the commit hash matches the known good one - && if [ "$(git rev-parse HEAD)" != "$PGIS_V1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ + && if [ "$(git rev-parse HEAD)" != "$PGIS1_MOBILITYDB_CHECKOUT_SHA1" ]; then exit 1; fi \ && git log -1 > /_MobilityDB_last_commit.txt \ && mkdir build \ && cd build \ @@ -161,6 +173,9 @@ RUN set -ex \ && make -j$(nproc) \ && make install + +FROM builder as builder-pgxn + RUN pgxn install ddlx RUN pgxn install h3 # https://github.com/zachasme/h3-pg RUN pgxn install json_accessors @@ -181,22 +196,43 @@ RUN pgxn install pgsql_tweaks RUN USE_PGXS=1 pgxn install sqlite_fdw {{ ) end -}} + +FROM builder as builder-other + +ARG PGIS1_PG_HINT_PLAN_REPOSITORY +ARG PGIS1_PG_HINT_PLAN_CHECKOUT +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 + +{{ if env.version | startswith("16") then ( -}} +# PG16 + hydra not supperted https://github.com/hydradatabase/hydra +{{ ) else ( -}} +# add add https://github.com/hydradatabase/hydra +RUN git clone --depth 1 https://github.com/hydradatabase/hydra \ + && cd hydra/columnar \ + && git checkout main \ + && ./configure \ + && make -j$(nproc) \ + && make install +{{ ) end -}} + +# install pg_hint_plan +RUN set -ex \ + && mkdir pg_hint_plan \ + && cd pg_hint_plan \ + && git init \ + && git remote add origin ${PGIS1_PG_HINT_PLAN_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PG_HINT_PLAN_CHECKOUT} \ + && git checkout FETCH_HEAD \ + # Verify that the commit hash matches the known good one + && if [ "$(git rev-parse HEAD)" != "$PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1" ]; then exit 1; fi \ + && make -j$(nproc) \ + && make install + RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ && cd postgres_dba \ && rm -rf .git -#TODO: add https://github.com/hydradatabase/hydra -# https://github.com/powa-team/pg_qualstats -# https://github.com/darold/pgtt -# https://github.com/apache/arrow-flight-sql-postgresql -# https://github.com/neondatabase/pg_embedding/ -# pgrust ; "pg-graphql -# https://github.com/kelvich/pg_tiktoken -# -# -------------------------------------------------------------- - - FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -205,7 +241,6 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization -#TODO - uncomment RUN set -ex \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen @@ -312,11 +347,23 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# Install from stages +COPY --from=builder-http-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-http-gzip /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-mobilitydb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-mobilitydb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-timescaledb /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-timescaledb /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-pgxn /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-pgxn /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib + +COPY --from=builder-other /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-other /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -# Install MobilityDB,Timescaledb,h3,etc from builder -COPY --from=builder /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ -COPY --from=builder /usr/lib/postgresql/$PG_MAJOR/lib /usr/lib/postgresql/$PG_MAJOR/lib -COPY --from=builder /postgres_dba /postgres_dba +COPY --from=builder-other /postgres_dba /postgres_dba # check any missing dependencies RUN set -ex \ @@ -335,10 +382,10 @@ RUN set -eux; \ cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ {{ if env.version | startswith("16") then ( -}} # add MobilityDB requirements; ( TimescaleDB not yet supported on pg16 ) - echo "shared_preload_libraries = 'postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ {{ ) else ( -}} # add MobilityDB and TimescaleDB requirements - echo "shared_preload_libraries = 'postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ {{ ) end -}} # MobilityDB recomendation echo "max_locks_per_transaction = 128" >> /usr/share/postgresql/postgresql.conf.sample; \ diff --git a/Dockerfile.master.template b/Dockerfile.master.template index 4fb7b2e3..bac14579 100644 --- a/Dockerfile.master.template +++ b/Dockerfile.master.template @@ -1,48 +1,48 @@ # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS_V1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} +ARG PGIS1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} -ARG PGIS_V1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git -ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git -ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git -ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git -ARG PGIS_V1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git +ARG PGIS1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git +ARG PGIS1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git +ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git +ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git -ARG PGIS_V1_POSTGIS_CHECKOUT={{ .[env.variant].POSTGIS_CHECKOUT }} -ARG PGIS_V1_GEOS_CHECKOUT={{ .[env.variant].GEOS_CHECKOUT }} -ARG PGIS_V1_GDAL_CHECKOUT={{ .[env.variant].GDAL_CHECKOUT }} -ARG PGIS_V1_PROJ_CHECKOUT={{ .[env.variant].PROJ_CHECKOUT }} -ARG PGIS_V1_SFCGAL_CHECKOUT={{ .[env.variant].SFCGAL_CHECKOUT }} -ARG PGIS_V1_CGAL_CHECKOUT={{ .[env.variant].CGAL_CHECKOUT }} +ARG PGIS1_POSTGIS_CHECKOUT={{ .[env.variant].POSTGIS_CHECKOUT }} +ARG PGIS1_GEOS_CHECKOUT={{ .[env.variant].GEOS_CHECKOUT }} +ARG PGIS1_GDAL_CHECKOUT={{ .[env.variant].GDAL_CHECKOUT }} +ARG PGIS1_PROJ_CHECKOUT={{ .[env.variant].PROJ_CHECKOUT }} +ARG PGIS1_SFCGAL_CHECKOUT={{ .[env.variant].SFCGAL_CHECKOUT }} +ARG PGIS1_CGAL_CHECKOUT={{ .[env.variant].CGAL_CHECKOUT }} -ARG PGIS_V1_BOOST_VERSION={{ .[env.variant].BOOST_VERSION }} +ARG PGIS1_BOOST_VERSION={{ .[env.variant].BOOST_VERSION }} -ARG PGIS_V1_CMAKE_BUILD_TYPE=Release +ARG PGIS1_CMAKE_BUILD_TYPE=Release -FROM ${PGIS_V1_BASE_IMAGE} as builder +FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / -ARG PGIS_V1_BOOST_VERSION -ENV PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ARG PGIS1_BOOST_VERSION +ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -97,42 +97,44 @@ RUN set -ex \ libwebp-dev \ libzstd-dev -ARG PGIS_V1_CMAKE_BUILD_TYPE -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} +ARG PGIS1_CMAKE_BUILD_TYPE +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} + +FROM builder as cgal-sfcgal-builder # cgal & sfcgal -ARG PGIS_V1_SFCGAL_REPOSITORY -ENV PGIS_V1_SFCGAL_REPOSITORY ${PGIS_V1_SFCGAL_REPOSITORY} -ARG PGIS_V1_SFCGAL_CHECKOUT -ENV PGIS_V1_SFCGAL_CHECKOUT ${PGIS_V1_SFCGAL_CHECKOUT} +ARG PGIS1_SFCGAL_REPOSITORY +ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} +ARG PGIS1_SFCGAL_CHECKOUT +ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS_V1_CGAL_REPOSITORY -ENV PGIS_V1_CGAL_REPOSITORY ${PGIS_V1_CGAL_REPOSITORY} -ARG PGIS_V1_CGAL_CHECKOUT -ENV PGIS_V1_CGAL_CHECKOUT ${PGIS_V1_CGAL_CHECKOUT} +ARG PGIS1_CGAL_REPOSITORY +ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} +ARG PGIS1_CGAL_CHECKOUT +ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir cgal \ && cd cgal \ && git init \ - && git remote add origin ${PGIS_V1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_CGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && mkdir SFCGAL \ && cd SFCGAL \ && git init \ - && git remote add origin ${PGIS_V1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_SFCGAL_CHECKOUT} \ + && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_sfcgal_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ && cmake .. \ -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ + -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ -DSFCGAL_BUILD_BENCH=OFF \ -DSFCGAL_BUILD_EXAMPLES=OFF \ -DSFCGAL_BUILD_TESTS=OFF \ @@ -143,18 +145,21 @@ RUN set -ex \ && rm -fr /usr/src/SFCGAL \ && rm -fr /usr/src/cgal + +FROM builder as proj-builder + # proj -ARG PGIS_V1_PROJ_REPOSITORY -ENV PGIS_V1_PROJ_REPOSITORY ${PGIS_V1_PROJ_REPOSITORY} -ARG PGIS_V1_PROJ_CHECKOUT -ENV PGIS_V1_PROJ_CHECKOUT ${PGIS_V1_PROJ_CHECKOUT} +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir PROJ \ && cd PROJ \ && git init \ - && git remote add origin ${PGIS_V1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_PROJ_CHECKOUT} \ + && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_proj_last_commit.txt \ # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 @@ -171,7 +176,7 @@ RUN set -ex \ && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ && mkdir build \ && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ ; \ @@ -179,41 +184,55 @@ RUN set -ex \ \ && rm -fr /usr/src/PROJ + +FROM builder as geos-builder + # geos -ARG PGIS_V1_GEOS_REPOSITORY -ENV PGIS_V1_GEOS_REPOSITORY ${PGIS_V1_GEOS_REPOSITORY} -ARG PGIS_V1_GEOS_CHECKOUT -ENV PGIS_V1_GEOS_CHECKOUT ${PGIS_V1_GEOS_CHECKOUT} +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir geos \ && cd geos \ && git init \ - && git remote add origin ${PGIS_V1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GEOS_CHECKOUT} \ + && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_geos_last_commit.txt \ && mkdir cmake-build \ && cd cmake-build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ && make -j$(nproc) \ && make install \ && cd / \ && rm -fr /usr/src/geos + +FROM builder as stage0-builder + +COPY --from=cgal-sfcgal-builder /_pgis*.* / +COPY --from=cgal-sfcgal-builder /usr/local /usr/local + +COPY --from=proj-builder /_pgis*.* / +COPY --from=proj-builder /usr/local /usr/local + +COPY --from=geos-builder /_pgis*.* / +COPY --from=geos-builder /usr/local /usr/local # gdal -ARG PGIS_V1_GDAL_REPOSITORY -ENV PGIS_V1_GDAL_REPOSITORY ${PGIS_V1_GDAL_REPOSITORY} -ARG PGIS_V1_GDAL_CHECKOUT -ENV PGIS_V1_GDAL_CHECKOUT ${PGIS_V1_GDAL_CHECKOUT} +ARG PGIS1_GDAL_REPOSITORY +ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} +ARG PGIS1_GDAL_CHECKOUT +ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} RUN set -ex \ && cd /usr/src \ && mkdir gdal \ && cd gdal \ && git init \ - && git remote add origin ${PGIS_V1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_GDAL_CHECKOUT} \ + && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_gdal_last_commit.txt \ \ @@ -237,7 +256,7 @@ RUN set -ex \ && mkdir build \ && cd build \ # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ + && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ -DBUILD_DOCS=OFF \ \ -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ @@ -291,36 +310,36 @@ RUN set -ex \ && pcre-config --version # ------------------------------------------- -# STAGE final +# final stage # ------------------------------------------- -FROM ${PGIS_V1_BASE_IMAGE} +FROM ${PGIS1_BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ org.opencontainers.image.description="PostGIS - {{ env.version }} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ARG PGIS_V1_CMAKE_BUILD_TYPE -ARG PGIS_V1_BASE_IMAGE -ARG PGIS_V1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE +ARG PGIS1_BOOST_VERSION -ENV PGIS_V1_CMAKE_BUILD_TYPE=${PGIS_V1_CMAKE_BUILD_TYPE} \ - PGIS_V1_BASE_IMAGE=${PGIS_V1_BASE_IMAGE} \ - PGIS_V1_BOOST_VERSION=${PGIS_V1_BOOST_VERSION} +ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ + PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE} \ + PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ - libboost-atomic${PGIS_V1_BOOST_VERSION} \ - libboost-chrono${PGIS_V1_BOOST_VERSION} \ - libboost-date-time${PGIS_V1_BOOST_VERSION} \ - libboost-filesystem${PGIS_V1_BOOST_VERSION} \ - libboost-program-options${PGIS_V1_BOOST_VERSION} \ - libboost-serialization${PGIS_V1_BOOST_VERSION} \ - libboost-system${PGIS_V1_BOOST_VERSION} \ - libboost-test${PGIS_V1_BOOST_VERSION} \ - libboost-thread${PGIS_V1_BOOST_VERSION} \ - libboost-timer${PGIS_V1_BOOST_VERSION} \ + libboost-atomic${PGIS1_BOOST_VERSION} \ + libboost-chrono${PGIS1_BOOST_VERSION} \ + libboost-date-time${PGIS1_BOOST_VERSION} \ + libboost-filesystem${PGIS1_BOOST_VERSION} \ + libboost-program-options${PGIS1_BOOST_VERSION} \ + libboost-serialization${PGIS1_BOOST_VERSION} \ + libboost-system${PGIS1_BOOST_VERSION} \ + libboost-test${PGIS1_BOOST_VERSION} \ + libboost-thread${PGIS1_BOOST_VERSION} \ + libboost-timer${PGIS1_BOOST_VERSION} \ libcurl3-gnutls \ libexpat1 \ libgmp10 \ @@ -354,26 +373,34 @@ RUN set -ex \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /_pgis*.* / -COPY --from=builder /usr/local /usr/local - -ARG PGIS_V1_GDAL_CHECKOUT -ARG PGIS_V1_GDAL_REPOSITORY -ARG PGIS_V1_GEOS_CHECKOUT -ARG PGIS_V1_GEOS_REPOSITORY -ARG PGIS_V1_PROJ_CHECKOUT -ARG PGIS_V1_PROJ_REPOSITORY -ARG PGIS_V1_SFCGAL_CHECKOUT -ARG PGIS_V1_SFCGAL_REPOSITORY - -ENV PGIS_V1_GDAL_CHECKOUT=${PGIS_V1_GDAL_CHECKOUT} \ - PGIS_V1_GDAL_REPOSITORY=${PGIS_V1_GDAL_REPOSITORY} \ - PGIS_V1_GEOS_CHECKOUT=${PGIS_V1_GEOS_CHECKOUT} \ - PGIS_V1_GEOS_REPOSITORY=${PGIS_V1_GEOS_REPOSITORY} \ - PGIS_V1_PROJ_CHECKOUT=${PGIS_V1_PROJ_CHECKOUT} \ - PGIS_V1_PROJ_REPOSITORY=${PGIS_V1_PROJ_REPOSITORY} \ - PGIS_V1_SFCGAL_CHECKOUT=${PGIS_V1_SFCGAL_CHECKOUT} \ - PGIS_V1_SFCGAL_REPOSITORY=${PGIS_V1_SFCGAL_REPOSITORY} +COPY --from=stage0-builder /_pgis*.* / +COPY --from=stage0-builder /usr/local /usr/local + +ARG PGIS1_GDAL_CHECKOUT +ARG PGIS1_GDAL_REPOSITORY +ARG PGIS1_GEOS_CHECKOUT +ARG PGIS1_GEOS_REPOSITORY +ARG PGIS1_PROJ_CHECKOUT +ARG PGIS1_PROJ_REPOSITORY +ARG PGIS1_SFCGAL_CHECKOUT +ARG PGIS1_SFCGAL_REPOSITORY +ARG PGIS1_CGAL_REPOSITORY +ARG PGIS1_CGAL_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_REPOSITORY + +ENV PGIS1_GDAL_CHECKOUT=${PGIS1_GDAL_CHECKOUT} \ + PGIS1_GDAL_REPOSITORY=${PGIS1_GDAL_REPOSITORY} \ + PGIS1_GEOS_CHECKOUT=${PGIS1_GEOS_CHECKOUT} \ + PGIS1_GEOS_REPOSITORY=${PGIS1_GEOS_REPOSITORY} \ + PGIS1_PROJ_CHECKOUT=${PGIS1_PROJ_CHECKOUT} \ + PGIS1_PROJ_REPOSITORY=${PGIS1_PROJ_REPOSITORY} \ + PGIS1_CGAL_CHECKOUT=${PGIS1_CGAL_CHECKOUT} \ + PGIS1_CGAL_REPOSITORY=${PGIS1_CGAL_REPOSITORY} \ + PGIS1_SFCGAL_CHECKOUT=${PGIS1_SFCGAL_CHECKOUT} \ + PGIS1_SFCGAL_REPOSITORY=${PGIS1_SFCGAL_REPOSITORY} \ + PGIS1_POSTGIS_CHECKOUT=${PGIS1_POSTGIS_CHECKOUT} \ + PGIS1_POSTGIS_REPOSITORY=${PGIS1_POSTGIS_REPOSITORY} # Minimal command line test ( fail fast ) RUN set -ex \ @@ -391,13 +418,6 @@ RUN set -ex \ && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 -# install postgis -ARG PGIS_V1_POSTGIS_CHECKOUT -ARG PGIS_V1_POSTGIS_REPOSITORY - -ENV PGIS_V1_POSTGIS_CHECKOUT=${PGIS_V1_POSTGIS_CHECKOUT} \ - PGIS_V1_POSTGIS_REPOSITORY=${PGIS_V1_POSTGIS_REPOSITORY} - # temporary workaround for : nitdb: invalid locale settings; check LANG and LC_* environment variables # https://github.com/docker-library/postgres/issues/1112#issuecomment-1746076388 RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen @@ -440,8 +460,8 @@ RUN set -ex \ && mkdir postgis \ && cd postgis \ && git init \ - && git remote add origin ${PGIS_V1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS_V1_POSTGIS_CHECKOUT} \ + && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ + && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ && git checkout FETCH_HEAD \ && git log -1 > /_pgis_last_commit.txt \ && ./autogen.sh \ diff --git a/Makefile b/Makefile index 5f97d026..190887a2 100644 --- a/Makefile +++ b/Makefile @@ -132,7 +132,7 @@ test: $(foreach dir,$(DOCKERFILE_DIRS),test-$(word 1,$(subst /, ,$(dir)))-$(word # -------------------------------------------------- # Push targets for each version-variant combination define push-target -push-$(1)-$(2): $(if $(filter 2,$(shell echo $(1) | grep -o '-' | wc -l)),push-$(shell echo $(1) | cut -d- -f1,2)-$(2)) +push-$(1)-$(2): $(if $(filter 2,$(shell echo $(1) | grep -o '-' | wc -l)),push-$(shell echo $(1) | cut -d- -f1,2)-$(2)) @echo '::push $(1)/$(2)' # push all image tags $(foreach tag,$(shell cat $(1)/$(2)/tags), \ diff --git a/README.md b/README.md index 4272da54..6e24fcb3 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This image ensures that the default database created by the parent `postgres` im Unless `-e POSTGRES_DB` is passed to the container at startup time, this database will be named after the admin user (either `postgres` or the user specified with `-e POSTGRES_USER`). If you would prefer to use the older template database mechanism for enabling PostGIS, the image also provides a PostGIS-enabled template database called `template_postgis`. -## Versions (2023-10-08) +## Versions (2023-10-11) We provide multi-platform image support for the following architectures: @@ -87,29 +87,29 @@ For those new to PostGIS, we recommend the following image versions: -### 🧪Recentstack ( experimental ) +### 🧪Recent ( experimental ) - + | `imresamu/postgis-amd64:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`15-recentstack-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recentstack-bookworm), [`15-recentstack`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recentstack) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-recentstack/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | ..recentstack: latest tagged postgis, geos, proj, gdal | -| [`16-recentstack-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recentstack-bookworm), [`16-recentstack`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recentstack) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-recentstack/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | ..recentstack: latest tagged postgis, geos, proj, gdal | - +| [`15-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recent-bookworm), [`15-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | ..recent: latest tagged postgis, geos, proj, gdal | +| [`16-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-bookworm), [`16-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | ..recent: latest tagged postgis, geos, proj, gdal | + ### 🧪Debian Geo Bundle ( experimental ) This repository provides Debian-based PostGIS Docker images enriched with additional geospatial packages such as [pgRouting](https://pgrouting.org/), [h3-pg]( https://github.com/zachasme/h3-pg), [pgsql-ogr-fdw](https://github.com/pramsey/pgsql-ogr-fdw), [MobilityDB](https://mobilitydb.com/), [PL/Python3](https://www.postgresql.org/docs/current/plpython.html), [pgPointcloud](https://pgpointcloud.github.io/pointcloud/), [pgVector](https://github.com/pgvector/pgvector), [TimeScaleDB](https://www.timescale.com/) and others. These images serve as a comprehensive solution for various server side geospatial needs. -Please note that the included package list is subject to change as we continue to refine the bundle. +Please note that the included package list is subject to change as we continue to refine the 'bundle0'. - + + | `imresamu/postgis-amd64:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`13-3.4-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-bundle-bookworm), [`13-3.4.0-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.0-bundle-bookworm), [`13-3.4-bundle`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-bundle) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4-bundle/bookworm/Dockerfile) | amd64 arm64 | bookworm | 13 | 3.4.0 | -| [`14-3.4-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bundle-bookworm), [`14-3.4.0-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.0-bundle-bookworm), [`14-3.4-bundle`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bundle) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4-bundle/bookworm/Dockerfile) | amd64 arm64 | bookworm | 14 | 3.4.0 | -| [`15-3.4-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bundle-bookworm), [`15-3.4.0-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.0-bundle-bookworm), [`15-3.4-bundle`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bundle), [`bundle`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=bundle) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4-bundle/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | 3.4.0 | -| [`16-3.4-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bundle-bookworm), [`16-3.4.0-bundle-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.0-bundle-bookworm), [`16-3.4-bundle`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bundle) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4-bundle/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.4.0 | - +| [`14-3.4-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bundle0-bookworm), [`14-3.4.0-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.0-bundle0-bookworm), [`14-3.4-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 14 | 3.4.0 | +| [`15-3.4-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bundle0-bookworm), [`15-3.4.0-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.0-bundle0-bookworm), [`15-3.4-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bundle0), [`bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | 3.4.0 | +| [`16-3.4-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bundle0-bookworm), [`16-3.4.0-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.0-bundle0-bookworm), [`16-3.4-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.4.0 | + ### ⛰️Alpine based diff --git a/apply-readme.sh b/apply-readme.sh index 887f13e3..282a7592 100755 --- a/apply-readme.sh +++ b/apply-readme.sh @@ -10,7 +10,7 @@ versions=$(jq 'keys[]' "$input_file") distinct_variants=$(jq -r 'to_entries[] | .value | keys[]' "$input_file" | sort -u) rm -f _dockerlists_*.md -for readme_group in $distinct_variants recentstack bundle test; do +for readme_group in $distinct_variants recent bundle0 test; do echo "init _dockerlists_${readme_group}.md" echo "| \`$dockername:\` tags | Dockerfile | Arch | OS | Postgres | PostGIS |" >>_dockerlists_"${readme_group}".md echo "| ---- | :-: | :-: | :-: | :-: | :-: |" >>_dockerlists_"${readme_group}".md @@ -31,8 +31,8 @@ for version in $versions; do if [[ "$postgis" == "master" ]]; then POSTGIS_DOC_VERSION="development: postgis, geos, proj, gdal" - elif [[ "$postgis" == "recentstack" ]]; then - POSTGIS_DOC_VERSION="..recentstack: latest tagged postgis, geos, proj, gdal" + elif [[ "$postgis" == "recent" ]]; then + POSTGIS_DOC_VERSION="..recent: latest tagged postgis, geos, proj, gdal" else POSTGIS_DOC_VERSION=$(echo "$POSTGIS_VERSION" | awk -F'[+-]' '{print $1}') fi @@ -54,7 +54,7 @@ echo "|-------------------------|" echo "|- Generated images -|" echo "|-------------------------|" -for readme_group in $distinct_variants recentstack bundle test; do +for readme_group in $distinct_variants recent bundle0 test; do echo " " echo "---- ${readme_group} ----" cat _dockerlists_"${readme_group}".md @@ -65,7 +65,7 @@ done TODAY=$(date +%Y-%m-%d) sed -i -r "s/(## Versions) \([0-9]{4}-[0-9]{2}-[0-9]{2}\)/\1 ($TODAY)/g" README.md # Replace content between the special comments in README.md for each readme_group -for readme_group in $distinct_variants recentstack bundle test; do +for readme_group in $distinct_variants recent bundle0 test; do echo "## ${readme_group} ##" awk -v readme_group="$readme_group" -v content="$(<_dockerlists_"${readme_group}".md)" ' $0 ~ "" {print; print content; f=1; next} diff --git a/localtest.sh b/localtest.sh index 89d54ee9..f38f95f1 100755 --- a/localtest.sh +++ b/localtest.sh @@ -33,20 +33,17 @@ echo " ------- .env.test -------- " cat .env.test echo " -------------------------- " -# generate,update -# versions.json, Dockerfiles, README.md, .github/workflows/main.yml .circleci/config.yml - ./update.sh # check commands -make -n test-15-3.4-bundle-bookworm -make -n push-15-3.4-bundle-bookworm -make -n manifest-15-3.4-bundle-bookworm +make -n test-15-3.4-bundle0-bookworm +make -n push-15-3.4-bundle0-bookworm +make -n manifest-15-3.4-bundle0-bookworm # run commands -make test-15-3.4-bundle-bookworm -make push-15-3.4-bundle-bookworm -make manifest-15-3.4-bundle-bookworm +make test-15-3.4-bundle0-bookworm +make push-15-3.4-bundle0-bookworm +make manifest-15-3.4-bundle0-bookworm # check images echo " " @@ -65,7 +62,7 @@ echo "done." # manual tests cheetsheets: # ---------------------------- -# REGISTRY=localhost:5000 make push-15-3.4-bundle -# REGISTRY=localhost:5000 make push-15-3.4-bundle-bookworm -# TEST=true make push-15-3.4-bundle-bookworm +# REGISTRY=localhost:5000 make push-15-3.4-bundle0 +# REGISTRY=localhost:5000 make push-15-3.4-bundle0-bookworm +# TEST=true make push-15-3.4-bundle0-bookworm # diff --git a/manifest.sh b/manifest.sh index 7f903771..3255c702 100755 --- a/manifest.sh +++ b/manifest.sh @@ -174,26 +174,6 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:13-3.4.0-bullseye \ --target ${dockername}:13-3.4.0-bullseye || true -# ----- 13-3.4-bundle-bookworm ----- - -echo "manifest: ${dockername}:13-3.4-bundle-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-bundle-bookworm \ - --target ${dockername}:13-3.4-bundle-bookworm || true - -echo "manifest: ${dockername}:13-3.4.0-bundle-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4.0-bundle-bookworm \ - --target ${dockername}:13-3.4.0-bundle-bookworm || true - -echo "manifest: ${dockername}:13-3.4-bundle" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-bundle \ - --target ${dockername}:13-3.4-bundle || true - # ----- 14-3.4-alpine3.18 ----- echo "manifest: ${dockername}:14-3.4-alpine3.18" @@ -248,25 +228,25 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:14-3.4.0-bullseye \ --target ${dockername}:14-3.4.0-bullseye || true -# ----- 14-3.4-bundle-bookworm ----- +# ----- 14-3.4-bundle0-bookworm ----- -echo "manifest: ${dockername}:14-3.4-bundle-bookworm" +echo "manifest: ${dockername}:14-3.4-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-bundle-bookworm \ - --target ${dockername}:14-3.4-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:14-3.4-bundle0-bookworm \ + --target ${dockername}:14-3.4-bundle0-bookworm || true -echo "manifest: ${dockername}:14-3.4.0-bundle-bookworm" +echo "manifest: ${dockername}:14-3.4.0-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4.0-bundle-bookworm \ - --target ${dockername}:14-3.4.0-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:14-3.4.0-bundle0-bookworm \ + --target ${dockername}:14-3.4.0-bundle0-bookworm || true -echo "manifest: ${dockername}:14-3.4-bundle" +echo "manifest: ${dockername}:14-3.4-bundle0" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-bundle \ - --target ${dockername}:14-3.4-bundle || true + --template ${dockername}-ARCHVARIANT:14-3.4-bundle0 \ + --target ${dockername}:14-3.4-bundle0 || true # ----- 15-3.4-alpine3.18 ----- @@ -334,31 +314,31 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:15-3.4.0-bullseye \ --target ${dockername}:15-3.4.0-bullseye || true -# ----- 15-3.4-bundle-bookworm ----- +# ----- 15-3.4-bundle0-bookworm ----- -echo "manifest: ${dockername}:15-3.4-bundle-bookworm" +echo "manifest: ${dockername}:15-3.4-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-bundle-bookworm \ - --target ${dockername}:15-3.4-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:15-3.4-bundle0-bookworm \ + --target ${dockername}:15-3.4-bundle0-bookworm || true -echo "manifest: ${dockername}:15-3.4.0-bundle-bookworm" +echo "manifest: ${dockername}:15-3.4.0-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.0-bundle-bookworm \ - --target ${dockername}:15-3.4.0-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:15-3.4.0-bundle0-bookworm \ + --target ${dockername}:15-3.4.0-bundle0-bookworm || true -echo "manifest: ${dockername}:15-3.4-bundle" +echo "manifest: ${dockername}:15-3.4-bundle0" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-bundle \ - --target ${dockername}:15-3.4-bundle || true + --template ${dockername}-ARCHVARIANT:15-3.4-bundle0 \ + --target ${dockername}:15-3.4-bundle0 || true -echo "manifest: ${dockername}:bundle" +echo "manifest: ${dockername}:bundle0" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:bundle \ - --target ${dockername}:bundle || true + --template ${dockername}-ARCHVARIANT:bundle0 \ + --target ${dockername}:bundle0 || true # ----- 15-master-bookworm ----- @@ -374,19 +354,19 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:15-master \ --target ${dockername}:15-master || true -# ----- 15-recentstack-bookworm ----- +# ----- 15-recent-bookworm ----- -echo "manifest: ${dockername}:15-recentstack-bookworm" +echo "manifest: ${dockername}:15-recent-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recentstack-bookworm \ - --target ${dockername}:15-recentstack-bookworm || true + --template ${dockername}-ARCHVARIANT:15-recent-bookworm \ + --target ${dockername}:15-recent-bookworm || true -echo "manifest: ${dockername}:15-recentstack" +echo "manifest: ${dockername}:15-recent" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recentstack \ - --target ${dockername}:15-recentstack || true + --template ${dockername}-ARCHVARIANT:15-recent \ + --target ${dockername}:15-recent || true # ----- 16-3.4-alpine3.18 ----- @@ -442,25 +422,25 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:16-3.4.0-bullseye \ --target ${dockername}:16-3.4.0-bullseye || true -# ----- 16-3.4-bundle-bookworm ----- +# ----- 16-3.4-bundle0-bookworm ----- -echo "manifest: ${dockername}:16-3.4-bundle-bookworm" +echo "manifest: ${dockername}:16-3.4-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-bundle-bookworm \ - --target ${dockername}:16-3.4-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:16-3.4-bundle0-bookworm \ + --target ${dockername}:16-3.4-bundle0-bookworm || true -echo "manifest: ${dockername}:16-3.4.0-bundle-bookworm" +echo "manifest: ${dockername}:16-3.4.0-bundle0-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.0-bundle-bookworm \ - --target ${dockername}:16-3.4.0-bundle-bookworm || true + --template ${dockername}-ARCHVARIANT:16-3.4.0-bundle0-bookworm \ + --target ${dockername}:16-3.4.0-bundle0-bookworm || true -echo "manifest: ${dockername}:16-3.4-bundle" +echo "manifest: ${dockername}:16-3.4-bundle0" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-bundle \ - --target ${dockername}:16-3.4-bundle || true + --template ${dockername}-ARCHVARIANT:16-3.4-bundle0 \ + --target ${dockername}:16-3.4-bundle0 || true # ----- 16-master-bookworm ----- @@ -476,16 +456,16 @@ manifest-tool push from-args \ --template ${dockername}-ARCHVARIANT:16-master \ --target ${dockername}:16-master || true -# ----- 16-recentstack-bookworm ----- +# ----- 16-recent-bookworm ----- -echo "manifest: ${dockername}:16-recentstack-bookworm" +echo "manifest: ${dockername}:16-recent-bookworm" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recentstack-bookworm \ - --target ${dockername}:16-recentstack-bookworm || true + --template ${dockername}-ARCHVARIANT:16-recent-bookworm \ + --target ${dockername}:16-recent-bookworm || true -echo "manifest: ${dockername}:16-recentstack" +echo "manifest: ${dockername}:16-recent" manifest-tool push from-args \ --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recentstack \ - --target ${dockername}:16-recentstack || true + --template ${dockername}-ARCHVARIANT:16-recent \ + --target ${dockername}:16-recent || true diff --git a/versions.json b/versions.json index 45966a8c..996b38b2 100644 --- a/versions.json +++ b/versions.json @@ -110,27 +110,6 @@ "POSTGIS_CHECKOUT_SHA1": "0874ea342af5392e3cd9f4e6157ef08648c9d2d8" } }, - "13-3.4-bundle": { - "bookworm": { - "tags": "13-3.4-bundle-bookworm 13-3.4.0-bundle-bookworm 13-3.4-bundle", - "postgis": "3.4", - "readme_group": "bundle", - "PG_MAJOR": "13", - "PG_DOCKER": "13", - "arch": "amd64 arm64", - "template": "Dockerfile.bundle.template", - "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", - "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", - "PGSQL_HTTP_CHECKOUT": "tags/v1.6.0", - "PGSQL_HTTP_CHECKOUT_SHA1": "d0ca28df6121f10cd3868744d219904c7923c5be", - "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", - "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", - "TIMESCALEDB_CHECKOUT": "tags/2.12.0", - "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", - "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" - } - }, "14-3.4": { "bullseye": { "tags": "14-3.4-bullseye 14-3.4.0-bullseye", @@ -168,23 +147,25 @@ "POSTGIS_CHECKOUT_SHA1": "0874ea342af5392e3cd9f4e6157ef08648c9d2d8" } }, - "14-3.4-bundle": { + "14-3.4-bundle0": { "bookworm": { - "tags": "14-3.4-bundle-bookworm 14-3.4.0-bundle-bookworm 14-3.4-bundle", + "tags": "14-3.4-bundle0-bookworm 14-3.4.0-bundle0-bookworm 14-3.4-bundle0", "postgis": "3.4", - "readme_group": "bundle", + "readme_group": "bundle0", "PG_MAJOR": "14", "PG_DOCKER": "14", "arch": "amd64 arm64", - "template": "Dockerfile.bundle.template", + "template": "Dockerfile.bundle0.template", "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", "PGSQL_HTTP_CHECKOUT": "tags/v1.6.0", "PGSQL_HTTP_CHECKOUT_SHA1": "d0ca28df6121f10cd3868744d219904c7923c5be", "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", - "TIMESCALEDB_CHECKOUT": "tags/2.12.0", - "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "TIMESCALEDB_CHECKOUT": "tags/2.12.1-rc1", + "TIMESCALEDB_CHECKOUT_SHA1": "c93faddbe95e45d93a53c3f652e2033558e8b380", + "PG_HINT_PLAN_CHECKOUT": "tags/REL14_1_4_2", + "PG_HINT_PLAN_CHECKOUT_SHA1": "81e4f0f37966081bc1909db9796bfc1b1b5d2349", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -226,23 +207,25 @@ "POSTGIS_CHECKOUT_SHA1": "0874ea342af5392e3cd9f4e6157ef08648c9d2d8" } }, - "15-3.4-bundle": { + "15-3.4-bundle0": { "bookworm": { - "tags": "15-3.4-bundle-bookworm 15-3.4.0-bundle-bookworm 15-3.4-bundle bundle", + "tags": "15-3.4-bundle0-bookworm 15-3.4.0-bundle0-bookworm 15-3.4-bundle0 bundle0", "postgis": "3.4", - "readme_group": "bundle", + "readme_group": "bundle0", "PG_MAJOR": "15", "PG_DOCKER": "15", "arch": "amd64 arm64", - "template": "Dockerfile.bundle.template", + "template": "Dockerfile.bundle0.template", "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", "PGSQL_HTTP_CHECKOUT": "tags/v1.6.0", "PGSQL_HTTP_CHECKOUT_SHA1": "d0ca28df6121f10cd3868744d219904c7923c5be", "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", - "TIMESCALEDB_CHECKOUT": "tags/2.12.0", - "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "TIMESCALEDB_CHECKOUT": "tags/2.12.1-rc1", + "TIMESCALEDB_CHECKOUT_SHA1": "c93faddbe95e45d93a53c3f652e2033558e8b380", + "PG_HINT_PLAN_CHECKOUT": "tags/REL15_1_5_1", + "PG_HINT_PLAN_CHECKOUT_SHA1": "7a41e7ba94c8769895fefbb282f6943067adac2e", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -256,26 +239,26 @@ "PG_DOCKER": "15", "arch": "amd64 arm64", "template": "Dockerfile.master.template", - "POSTGIS_CHECKOUT": "5c3c66a9282b3472bb161f61d1e762789cf4928b", - "POSTGIS_CHECKOUT_SHA1": "5c3c66a9282b3472bb161f61d1e762789cf4928b", + "POSTGIS_CHECKOUT": "83fbad6d5213208f4af25a07c9ac2ed20e334ea9", + "POSTGIS_CHECKOUT_SHA1": "83fbad6d5213208f4af25a07c9ac2ed20e334ea9", "CGAL_CHECKOUT": "3c8e2053721271119499506ea1d8a49dee89e30c", "CGAL_CHECKOUT_SHA1": "3c8e2053721271119499506ea1d8a49dee89e30c", - "SFCGAL_CHECKOUT": "35f72d2f52b4253013201b170467757b0fc355e5", - "SFCGAL_CHECKOUT_SHA1": "35f72d2f52b4253013201b170467757b0fc355e5", + "SFCGAL_CHECKOUT": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "SFCGAL_CHECKOUT_SHA1": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", "PROJ_CHECKOUT": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", "PROJ_CHECKOUT_SHA1": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "GDAL_CHECKOUT": "78d5980666602266a7e532ae5f76ffe1bf70b4ec", - "GDAL_CHECKOUT_SHA1": "78d5980666602266a7e532ae5f76ffe1bf70b4ec", + "GDAL_CHECKOUT": "f3bc13dc4cc4512878852036283eb4d7519bd6c7", + "GDAL_CHECKOUT_SHA1": "f3bc13dc4cc4512878852036283eb4d7519bd6c7", "GEOS_CHECKOUT": "28d70a2e4582edcd3625659f70e31d1853423875", "GEOS_CHECKOUT_SHA1": "28d70a2e4582edcd3625659f70e31d1853423875", "BOOST_VERSION": "1.74.0" } }, - "15-recentstack": { + "15-recent": { "bookworm": { - "tags": "15-recentstack-bookworm 15-recentstack", - "postgis": "recentstack", - "readme_group": "recentstack", + "tags": "15-recent-bookworm 15-recent", + "postgis": "recent", + "readme_group": "recent", "PG_MAJOR": "15", "PG_DOCKER": "15", "arch": "amd64 arm64", @@ -332,23 +315,25 @@ "POSTGIS_CHECKOUT_SHA1": "0874ea342af5392e3cd9f4e6157ef08648c9d2d8" } }, - "16-3.4-bundle": { + "16-3.4-bundle0": { "bookworm": { - "tags": "16-3.4-bundle-bookworm 16-3.4.0-bundle-bookworm 16-3.4-bundle", + "tags": "16-3.4-bundle0-bookworm 16-3.4.0-bundle0-bookworm 16-3.4-bundle0", "postgis": "3.4", - "readme_group": "bundle", + "readme_group": "bundle0", "PG_MAJOR": "16", "PG_DOCKER": "16", "arch": "amd64 arm64", - "template": "Dockerfile.bundle.template", + "template": "Dockerfile.bundle0.template", "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", "PGSQL_HTTP_CHECKOUT": "tags/v1.6.0", "PGSQL_HTTP_CHECKOUT_SHA1": "d0ca28df6121f10cd3868744d219904c7923c5be", "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", - "TIMESCALEDB_CHECKOUT": "tags/2.12.0", - "TIMESCALEDB_CHECKOUT_SHA1": "ec99b00f18a6cc636fc7ff6e4bcff870d4201c90", + "TIMESCALEDB_CHECKOUT": "tags/2.12.1-rc1", + "TIMESCALEDB_CHECKOUT_SHA1": "c93faddbe95e45d93a53c3f652e2033558e8b380", + "PG_HINT_PLAN_CHECKOUT": "tags/REL16_1_6_0", + "PG_HINT_PLAN_CHECKOUT_SHA1": "fa0a461af929c06f7c96956369458456c26e7ad9", "POSTGIS_MAJOR": "3", "POSTGIS_VERSION": "3.4.0+dfsg-1.pgdg120+1" } @@ -362,26 +347,26 @@ "PG_DOCKER": "16", "arch": "amd64 arm64", "template": "Dockerfile.master.template", - "POSTGIS_CHECKOUT": "5c3c66a9282b3472bb161f61d1e762789cf4928b", - "POSTGIS_CHECKOUT_SHA1": "5c3c66a9282b3472bb161f61d1e762789cf4928b", + "POSTGIS_CHECKOUT": "83fbad6d5213208f4af25a07c9ac2ed20e334ea9", + "POSTGIS_CHECKOUT_SHA1": "83fbad6d5213208f4af25a07c9ac2ed20e334ea9", "CGAL_CHECKOUT": "3c8e2053721271119499506ea1d8a49dee89e30c", "CGAL_CHECKOUT_SHA1": "3c8e2053721271119499506ea1d8a49dee89e30c", - "SFCGAL_CHECKOUT": "35f72d2f52b4253013201b170467757b0fc355e5", - "SFCGAL_CHECKOUT_SHA1": "35f72d2f52b4253013201b170467757b0fc355e5", + "SFCGAL_CHECKOUT": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "SFCGAL_CHECKOUT_SHA1": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", "PROJ_CHECKOUT": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", "PROJ_CHECKOUT_SHA1": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "GDAL_CHECKOUT": "78d5980666602266a7e532ae5f76ffe1bf70b4ec", - "GDAL_CHECKOUT_SHA1": "78d5980666602266a7e532ae5f76ffe1bf70b4ec", + "GDAL_CHECKOUT": "f3bc13dc4cc4512878852036283eb4d7519bd6c7", + "GDAL_CHECKOUT_SHA1": "f3bc13dc4cc4512878852036283eb4d7519bd6c7", "GEOS_CHECKOUT": "28d70a2e4582edcd3625659f70e31d1853423875", "GEOS_CHECKOUT_SHA1": "28d70a2e4582edcd3625659f70e31d1853423875", "BOOST_VERSION": "1.74.0" } }, - "16-recentstack": { + "16-recent": { "bookworm": { - "tags": "16-recentstack-bookworm 16-recentstack", - "postgis": "recentstack", - "readme_group": "recentstack", + "tags": "16-recent-bookworm 16-recent", + "postgis": "recent", + "readme_group": "recent", "PG_MAJOR": "16", "PG_DOCKER": "16", "arch": "amd64 arm64", diff --git a/versions.sh b/versions.sh index f4b58303..fb1492b3 100755 --- a/versions.sh +++ b/versions.sh @@ -153,26 +153,34 @@ postgisGitHash="$(git ls-remote https://github.com/postgis/postgis.git heads/mas # Function to get the latest version tag and its SHA1 hash get_latest_version_and_hash() { # Argument 1: Repository URL - local repo_url=$1 + local repo_url="$1" # Argument 2: Repository identifier - local repo_id=$2 + local repo_id="$2" + # Argumnet 3: tag filter - optional + local repo_only="${3:-}" + echo "[+] Checking lastversion : $repo_id - $repo_url" # Fetch the latest version tag using the lastversion command - eval "lastversion_${repo_id}=$(lastversion --format tag --pre "${repo_url}")" + + if [ -z "$repo_only" ]; then + eval "lastversion_${repo_id}=$(lastversion --format tag --pre "${repo_url}")" + else + eval "lastversion_${repo_id}${repo_only}=$(lastversion --format tag --pre --only "${repo_only}" "${repo_url}")" + fi # Intermediary step to resolve the variable name - local var_name="lastversion_${repo_id}" + local var_name="lastversion_${repo_id}${repo_only}" local last_version=${!var_name} # Fetch the SHA1 hash of the tag using the get_tag_hash function - eval "lastversion_${repo_id}_sha1=$(get_tag_hash "${repo_url}" "${last_version}")" + eval "lastversion_${repo_id}${repo_only}_sha1=$(get_tag_hash "${repo_url}" "${last_version}")" #creating new variables for using later .. - echo " lastversion_${repo_id} = ${last_version}" + echo " lastversion_${repo_id}${repo_only} = ${last_version}" - local sha1_var_name="lastversion_${repo_id}_sha1" + local sha1_var_name="lastversion_${repo_id}${repo_only}_sha1" local sha1_value=${!sha1_var_name} - echo " lastversion_${repo_id}_sha1 = ${sha1_value}" + echo " lastversion_${repo_id}${repo_only}_sha1 = ${sha1_value}" echo " " } @@ -188,6 +196,11 @@ get_latest_version_and_hash "https://github.com/OSGeo/gdal" "gdal" get_latest_version_and_hash "https://github.com/OSGeo/PROJ" "proj" get_latest_version_and_hash "https://gitlab.com/Oslandia/SFCGAL" "sfcgal" +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL16 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL15 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL14 +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" REL13 + #------------------------------------------- function fetch_postgis_versions() { @@ -325,7 +338,7 @@ for version in "${versions[@]}"; do fi echo " " - if [[ "master" == "$postgisVersion" || "recentstack" == "$postgisVersion" ]]; then + if [[ "master" == "$postgisVersion" || "recent" == "$postgisVersion" ]]; then srcVersion="" srcSha256="" srcSha1="" @@ -375,13 +388,13 @@ for version in "${versions[@]}"; do postgisFullVersion["$suite"]="$postgisVersion" postgisMajor["$suite"]="" postgisDocSrc["$suite"]="development: postgis, geos, proj, gdal" - elif [ "recentstack" == "$postgisVersion" ]; then + elif [ "recent" == "$postgisVersion" ]; then #TODO debianPostgisMajMin["$suite"]="" postgisPackageName["$suite"]="" postgisFullVersion["$suite"]="$postgisVersion" postgisMajor["$suite"]="" - postgisDocSrc["$suite"]="... recentstack ... " + postgisDocSrc["$suite"]="... recent ... " else postgisMajMin["$suite"]="$(echo "${postgisVersion}" | cut -d. -f1).$(echo "${postgisVersion}" | cut -d. -f2)" echo "postgisMajMin[$suite]= ${postgisMajMin[${suite}]}" @@ -423,8 +436,8 @@ for version in "${versions[@]}"; do if [[ "master" == "$postgisVersion" ]]; then postgisDockerTag="master" - elif [[ "recentstack" == "$postgisVersion" ]]; then - postgisDockerTag="recentstack" + elif [[ "recent" == "$postgisVersion" ]]; then + postgisDockerTag="recent" else postgisDockerTag="${postgisLastDockerTags[$postgisVersion]}" fi @@ -434,8 +447,8 @@ for version in "${versions[@]}"; do if [ -n "$bundleType" ]; then readme_group="$bundleType" bundleTypeTags="-${bundleType}" - elif [[ "recentstack" == "$postgisVersion" ]]; then - readme_group="recentstack" + elif [[ "recent" == "$postgisVersion" ]]; then + readme_group="recent" elif [[ ${mainTags} =~ [a-zA-Z] ]]; then readme_group="test" else @@ -443,7 +456,7 @@ for version in "${versions[@]}"; do fi tags="${mainTags}${bundleTypeTags}-${variant}" - if [[ "master" != "$postgisVersion" && "recentstack" != "$postgisVersion" && "${postgisDocSrc[$variant]}" != "${postgisDockerTag}" ]]; then + if [[ "master" != "$postgisVersion" && "recent" != "$postgisVersion" && "${postgisDocSrc[$variant]}" != "${postgisDockerTag}" ]]; then tags+=" ${postgresLastMainTags[$postgresVersion]}-${postgisDocSrc[$variant]}${bundleTypeTags}-${variant}" fi if [[ "$variant" == "$debian_latest" ]]; then @@ -489,7 +502,7 @@ for version in "${versions[@]}"; do printf " BOOST_VERSION: '%s'\n" "${boostVersion[$variant]}" } >>_versions.yml - elif [[ "recentstack" == "$postgisVersion" ]]; then + elif [[ "recent" == "$postgisVersion" ]]; then { printf " arch: '%s'\n" "amd64 arm64" printf " template: '%s'\n" "Dockerfile.master.template" @@ -534,6 +547,12 @@ for version in "${versions[@]}"; do printf " TIMESCALEDB_CHECKOUT: 'tags/%s'\n" "$lastversion_timescaledb" printf " TIMESCALEDB_CHECKOUT_SHA1: '%s'\n" "$lastversion_timescaledb_sha1" + + lastversion_pg_hint_plan="lastversion_pg_hint_planREL${postgresVersion}" + lastversion_pg_hint_plan_sha1="lastversion_pg_hint_planREL${postgresVersion}_sha1" + printf " PG_HINT_PLAN_CHECKOUT: 'tags/%s'\n" "${!lastversion_pg_hint_plan}" + printf " PG_HINT_PLAN_CHECKOUT_SHA1: '%s'\n" "${!lastversion_pg_hint_plan_sha1}" + fi printf " POSTGIS_MAJOR: '%s'\n" "${postgisMajor[$variant]}" @@ -555,7 +574,7 @@ for version in "${versions[@]}"; do ) elif [ -d "$version/$variant" ]; then ( - if [[ "master" == "$postgisVersion" || "$postgisVersion" == "recentstack" ]]; then + if [[ "master" == "$postgisVersion" || "$postgisVersion" == "recent" ]]; then echo "Alpine - $postgisVersion is not supported! STOP!" exit 1 fi @@ -570,7 +589,7 @@ for version in "${versions[@]}"; do fi tags="${mainTags}-${variant}" - if [[ "master" != "$postgisVersion" && "$postgisVersion" != "recentstack" && "$srcVersion" != "${postgisLastDockerTags[$postgisVersion]}" ]]; then + if [[ "master" != "$postgisVersion" && "$postgisVersion" != "recent" && "$srcVersion" != "${postgisLastDockerTags[$postgisVersion]}" ]]; then tags+=" ${postgresLastMainTags[$postgresVersion]}-${srcVersion}-${variant}" fi if [[ "$variant" == "$alpine_latest" ]]; then