diff --git a/.circleci/config.yml b/.circleci/config.yml index ee052c28..b30ab291 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,11 @@ version: 2.1 orbs: # https://circleci.com/developer/orbs/orb/circleci/docker - docker: circleci/docker@2.2.0 + 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: @@ -24,6 +28,15 @@ jobs: - run: uname -a - run: docker --version - run: docker info + - run: + name: Install manifest-tool (linux-arm64 ) + command: | + 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-arm64 /usr/local/bin/manifest-tool + manifest-tool -v + - run: pip3 install lastversion - run: source tools/environment_init.sh - run: make check_version - docker/check: @@ -32,11 +45,14 @@ jobs: docker-password: DOCKERHUB_ACCESS_TOKEN - run: - name: Conditional Docker Check - Halt if not on master branch or if it's a PR + name: Conditional Docker Check - Halt if not on master branch or if it's a PR or Weekly image exists command: | # Check if the current branch is 'master' and the weekly image is not extis # If weekly image exists, skip docker build and push - if [ "$CIRCLE_BRANCH" == "master" ] && check_image_exists "${{ matrix.version }}-${{ matrix.variant }}$(IMAGE_VERSION_ID)"; then + source tools/environment_init.sh + echo "check: << parameters.target-version-variant >>${IMAGE_VERSION_ID}" + check_image_exists "<< parameters.target-version-variant >>${IMAGE_VERSION_ID}" || true + if [ "$CIRCLE_BRANCH" == "master" ] && check_image_exists "<< parameters.target-version-variant >>${IMAGE_VERSION_ID}"; then circleci-agent step halt fi @@ -53,15 +69,6 @@ jobs: circleci-agent step halt fi - - run: - name: Install manifest-tool (linux-arm64 ) - command: | - 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-arm64 /usr/local/bin/manifest-tool - manifest-tool -v - - run: name: "Push docker image : make push-<< parameters.target-version-variant >>" command: | @@ -93,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/localtest.yml b/.github/workflows/localtest.yml index 79a0dfe3..1a46d84f 100644 --- a/.github/workflows/localtest.yml +++ b/.github/workflows/localtest.yml @@ -13,5 +13,13 @@ jobs: steps: - uses: actions/checkout@v4 - run: docker ps -a + - 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 - run: ./localtest.sh - run: docker images diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed1d08e0..859c4416 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" @@ -64,6 +63,16 @@ 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 @@ -105,6 +114,13 @@ jobs: echo "weekly build exists; no need to re-build. STOP" exit 0 + - name: Login to dockerhub + uses: docker/login-action@v2 + if: ${{ (env.IMAGE_EXISTS == 'false') && (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + - name: "verify: make -n test-${{ matrix.version }}-${{ matrix.variant }} tags ${{ matrix.tags }}" if: env.IMAGE_EXISTS == 'false' run: make -n test-${{ matrix.version }}-${{ matrix.variant }} @@ -115,22 +131,6 @@ jobs: - run: make dockerlist - - name: Login to dockerhub - uses: docker/login-action@v2 - if: ${{ (env.IMAGE_EXISTS == 'false') && (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - - - name: Install manifest-tool - if: ${{ (env.IMAGE_EXISTS == 'false') && (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} - 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: Push docker image to dockerhub if: ${{ (env.IMAGE_EXISTS == 'false') && (github.ref == 'refs/heads/master') && (github.event_name != 'pull_request') }} env: @@ -155,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 @@ -170,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: @@ -189,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 69c39d2e..c7689bfa 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/11-3.3/bookworm/Dockerfile b/11-3.3/bookworm/Dockerfile index 8128b856..735ef691 100644 --- a/11-3.3/bookworm/Dockerfile +++ b/11-3.3/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/11-3.3/bullseye/Dockerfile b/11-3.3/bullseye/Dockerfile index b8724f19..d6a537d6 100644 --- a/11-3.3/bullseye/Dockerfile +++ b/11-3.3/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/12-3.4/alpine3.18/Dockerfile b/12-3.4/alpine3.18/Dockerfile index 2e59d293..834d6adc 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/12-3.4/bookworm/Dockerfile b/12-3.4/bookworm/Dockerfile index c2d8c7fa..a4e7df64 100644 --- a/12-3.4/bookworm/Dockerfile +++ b/12-3.4/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/12-3.4/bullseye/Dockerfile b/12-3.4/bullseye/Dockerfile index b0c0d36e..b421824c 100644 --- a/12-3.4/bullseye/Dockerfile +++ b/12-3.4/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; 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 814beaf9..5a0a52ab 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/13-3.4/bookworm/Dockerfile b/13-3.4/bookworm/Dockerfile index d2c5f4bb..bb6191ba 100644 --- a/13-3.4/bookworm/Dockerfile +++ b/13-3.4/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/13-3.4/bullseye/Dockerfile b/13-3.4/bullseye/Dockerfile index d3621705..46ea47c6 100644 --- a/13-3.4/bullseye/Dockerfile +++ b/13-3.4/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; 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 53% rename from 14-3.4-bundle/bookworm/Dockerfile rename to 14-3.4-bundle0/bookworm/Dockerfile index 5cde84a5..8d514cc6 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,28 +16,32 @@ 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-beta1 +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=641d0818542acbfadbfbb54b131a3af75f8dc809 -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 +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 -RUN set -ex \ +FROM ${PGIS1_BASE_IMAGE} AS builder + +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -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,67 +76,67 @@ 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 \ +RUN set -eux \ && 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 -RUN set -ex \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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,35 +174,57 @@ RUN set -ex \ && 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 + +FROM builder as builder-pgxn + +RUN pgxn install --verbose ddlx +RUN pgxn install --verbose h3 # https://github.com/zachasme/h3-pg +RUN pgxn install --verbose json_accessors +RUN pgxn install --verbose lostgis +RUN pgxn install --verbose parray_gin +RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl +RUN pgxn install --verbose pg_roaringbitmap +RUN pgxn install --verbose pg_rowalesce +RUN pgxn install --verbose pg_uuidv7 +RUN pgxn install --verbose pg_xenophile +RUN pgxn install --verbose pg_xxhash +RUN pgxn install --verbose 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 +FROM builder as builder-other -#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 -# -# -------------------------------------------------------------- +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 set -eux \ + && 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 -eux \ + && 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 set -eux \ + && git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ + && cd postgres_dba \ + && rm -rf .git FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:14-3.4-bookworm @@ -201,12 +235,11 @@ 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 \ +RUN set -eux \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ \ @@ -296,18 +329,31 @@ 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 \ +RUN set -eux \ && 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) \ +RUN set -eux \ + && 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 ; \ @@ -315,10 +361,10 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ fi # add MobilityDB requirements -RUN set -eux; \ - cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ +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 1809db54..84b212d5 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/14-3.4/bookworm/Dockerfile b/14-3.4/bookworm/Dockerfile index 1ce16c73..007cc600 100644 --- a/14-3.4/bookworm/Dockerfile +++ b/14-3.4/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/14-3.4/bullseye/Dockerfile b/14-3.4/bullseye/Dockerfile index d2ee3dd0..1896d397 100644 --- a/14-3.4/bullseye/Dockerfile +++ b/14-3.4/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; 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 53% rename from 15-3.4-bundle/bookworm/Dockerfile rename to 15-3.4-bundle0/bookworm/Dockerfile index 698a68ba..a9c6b6b5 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,28 +16,32 @@ 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-beta1 +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=641d0818542acbfadbfbb54b131a3af75f8dc809 -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 +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 -RUN set -ex \ +FROM ${PGIS1_BASE_IMAGE} AS builder + +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -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,67 +76,67 @@ 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 \ +RUN set -eux \ && 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 -RUN set -ex \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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,35 +174,57 @@ RUN set -ex \ && 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 + +FROM builder as builder-pgxn + +RUN pgxn install --verbose ddlx +RUN pgxn install --verbose h3 # https://github.com/zachasme/h3-pg +RUN pgxn install --verbose json_accessors +RUN pgxn install --verbose lostgis +RUN pgxn install --verbose parray_gin +RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl +RUN pgxn install --verbose pg_roaringbitmap +RUN pgxn install --verbose pg_rowalesce +RUN pgxn install --verbose pg_uuidv7 +RUN pgxn install --verbose pg_xenophile +RUN pgxn install --verbose pg_xxhash +RUN pgxn install --verbose 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 +FROM builder as builder-other -#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 -# -# -------------------------------------------------------------- +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 set -eux \ + && 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 -eux \ + && 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 set -eux \ + && git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ + && cd postgres_dba \ + && rm -rf .git FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm @@ -201,12 +235,11 @@ 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 \ +RUN set -eux \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ \ @@ -296,18 +329,31 @@ 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 \ +RUN set -eux \ && 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) \ +RUN set -eux \ + && 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 ; \ @@ -315,10 +361,10 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ fi # add MobilityDB requirements -RUN set -eux; \ - cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ +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 0eb9d05b..53e2d2b6 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/15-3.4/bookworm/Dockerfile b/15-3.4/bookworm/Dockerfile index 04d8b592..87fb0189 100644 --- a/15-3.4/bookworm/Dockerfile +++ b/15-3.4/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/15-3.4/bullseye/Dockerfile b/15-3.4/bullseye/Dockerfile index a951b696..260921b9 100644 --- a/15-3.4/bullseye/Dockerfile +++ b/15-3.4/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/15-master/bookworm/Dockerfile b/15-master/bookworm/Dockerfile index 12842668..2879f9d0 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=2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4 -ARG PGIS_V1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f -ARG PGIS_V1_SFCGAL_CHECKOUT=35f72d2f52b4253013201b170467757b0fc355e5 -ARG PGIS_V1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c +ARG PGIS1_POSTGIS_CHECKOUT=b178091a9833febf41d6d9f388804a414a26421a +ARG PGIS1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 +ARG PGIS1_GDAL_CHECKOUT=7c78481624c632a996915195b298190c23c3cc2e +ARG PGIS1_PROJ_CHECKOUT=61003c9550925bcfc7c0ab37f3c64fc6c29c46a4 +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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ @@ -280,7 +299,7 @@ RUN set -ex \ && rm -fr /usr/src/gdal # Minimal command line test. -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -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 \ +RUN set -eux \ && 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,29 +366,37 @@ 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 \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -384,14 +411,12 @@ 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 set -eux \ + && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -429,8 +454,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 \ @@ -509,7 +534,7 @@ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh COPY ./update-postgis.sh /usr/local/bin # last final test -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ diff --git a/16-recentstack/bookworm/Dockerfile b/15-recent/bookworm/Dockerfile similarity index 65% rename from 16-recentstack/bookworm/Dockerfile rename to 15-recent/bookworm/Dockerfile index 802e8548..a35c55cc 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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ @@ -280,7 +299,7 @@ RUN set -ex \ && rm -fr /usr/src/gdal # Minimal command line test. -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -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 \ +RUN set -eux \ && 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,29 +366,37 @@ 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 \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -384,14 +411,12 @@ 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 set -eux \ + && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -429,8 +454,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 \ @@ -509,7 +534,7 @@ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh COPY ./update-postgis.sh /usr/local/bin # last final test -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ 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 53% rename from 16-3.4-bundle/bookworm/Dockerfile rename to 16-3.4-bundle0/bookworm/Dockerfile index 383cc568..2e7f55f5 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,28 +16,32 @@ 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-beta1 +ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=641d0818542acbfadbfbb54b131a3af75f8dc809 -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 +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 -RUN set -ex \ +FROM ${PGIS1_BASE_IMAGE} AS builder + +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -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,63 +76,69 @@ 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 \ +RUN set -eux \ && 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 -RUN set -ex \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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,36 +149,51 @@ RUN set -ex \ && 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 + +FROM builder as builder-pgxn + +RUN pgxn install --verbose ddlx +RUN pgxn install --verbose h3 # https://github.com/zachasme/h3-pg +RUN pgxn install --verbose json_accessors +RUN pgxn install --verbose lostgis +RUN pgxn install --verbose parray_gin +RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl +RUN pgxn install --verbose pg_roaringbitmap +RUN pgxn install --verbose pg_rowalesce +RUN pgxn install --verbose pg_uuidv7 +RUN pgxn install --verbose pg_xenophile +RUN pgxn install --verbose pg_xxhash +RUN pgxn install --verbose pgsql_tweaks # sqlite_fdw not supported on pg16 yet # 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 +FROM builder as builder-other -#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 -# -# -------------------------------------------------------------- +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 -eux \ + && 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 set -eux \ + && git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ + && cd postgres_dba \ + && rm -rf .git FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm @@ -177,12 +204,11 @@ 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 \ +RUN set -eux \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ \ @@ -275,18 +301,31 @@ 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 \ +RUN set -eux \ && 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) \ +RUN set -eux \ + && 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 ; \ @@ -294,10 +333,10 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ fi # add MobilityDB requirements -RUN set -eux; \ - cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ +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 fbaef91e..589a5ee8 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 \ @@ -54,9 +54,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -76,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 \ @@ -140,8 +139,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/16-3.4/bookworm/Dockerfile b/16-3.4/bookworm/Dockerfile index 4d4ac31a..8231a9b1 100644 --- a/16-3.4/bookworm/Dockerfile +++ b/16-3.4/bookworm/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg120+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/16-3.4/bullseye/Dockerfile b/16-3.4/bullseye/Dockerfile index d3295536..0e262ba4 100644 --- a/16-3.4/bullseye/Dockerfile +++ b/16-3.4/bullseye/Dockerfile @@ -12,7 +12,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.4.0+dfsg-1.pgdg110+1 -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/16-master/bookworm/Dockerfile b/16-master/bookworm/Dockerfile index f02080ec..a0adaeff 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=2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4 -ARG PGIS_V1_PROJ_CHECKOUT=2040e685f5ab9c2958b7b611f5aaafee21fed82f -ARG PGIS_V1_SFCGAL_CHECKOUT=35f72d2f52b4253013201b170467757b0fc355e5 -ARG PGIS_V1_CGAL_CHECKOUT=3c8e2053721271119499506ea1d8a49dee89e30c +ARG PGIS1_POSTGIS_CHECKOUT=b178091a9833febf41d6d9f388804a414a26421a +ARG PGIS1_GEOS_CHECKOUT=28d70a2e4582edcd3625659f70e31d1853423875 +ARG PGIS1_GDAL_CHECKOUT=7c78481624c632a996915195b298190c23c3cc2e +ARG PGIS1_PROJ_CHECKOUT=61003c9550925bcfc7c0ab37f3c64fc6c29c46a4 +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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ @@ -280,7 +299,7 @@ RUN set -ex \ && rm -fr /usr/src/gdal # Minimal command line test. -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -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 \ +RUN set -eux \ && 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,29 +366,37 @@ 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 \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -384,14 +411,12 @@ 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 set -eux \ + && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -429,8 +454,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 \ @@ -509,7 +534,7 @@ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh COPY ./update-postgis.sh /usr/local/bin # last final test -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ diff --git a/15-recentstack/bookworm/Dockerfile b/16-recent/bookworm/Dockerfile similarity index 65% rename from 15-recentstack/bookworm/Dockerfile rename to 16-recent/bookworm/Dockerfile index ca7c4148..a7dab8de 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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ @@ -280,7 +299,7 @@ RUN set -ex \ && rm -fr /usr/src/gdal # Minimal command line test. -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -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 \ +RUN set -eux \ && 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,29 +366,37 @@ 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 \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -384,14 +411,12 @@ 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 set -eux \ + && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -429,8 +454,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 \ @@ -509,7 +534,7 @@ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh COPY ./update-postgis.sh /usr/local/bin # last final test -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ 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 7a6e8a0c..73a865b6 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 \ @@ -49,9 +49,8 @@ RUN set -eux \ \ autoconf \ automake \ + bison \ cunit-dev \ - docbook-xml \ - docbook5-xml \ file \ g++ \ gcc \ @@ -71,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 \ @@ -135,8 +134,12 @@ RUN set -eux \ ca-certificates \ # clean && cd / \ - && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + #&& apk del .fetch-deps \ # At the end of the build, we print the collected information # from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes. && cat /_pgis_full_version.txt diff --git a/Dockerfile.bundle.template b/Dockerfile.bundle0.template similarity index 55% rename from Dockerfile.bundle.template rename to Dockerfile.bundle0.template index 4a2cc2c2..211260b6 100644 --- a/Dockerfile.bundle.template +++ b/Dockerfile.bundle0.template @@ -11,28 +11,32 @@ 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 }} -RUN set -ex \ +FROM ${PGIS1_BASE_IMAGE} AS builder + +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -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,70 +71,70 @@ 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 \ +RUN set -eux \ && 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 -RUN set -ex \ +RUN set -eux \ && 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 ( -}} # Install TimescaleDB; no Arm64 apt support, so build from source -RUN set -ex \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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,18 +173,21 @@ RUN set -ex \ && 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 + +FROM builder as builder-pgxn + +RUN pgxn install --verbose ddlx +RUN pgxn install --verbose h3 # https://github.com/zachasme/h3-pg +RUN pgxn install --verbose json_accessors +RUN pgxn install --verbose lostgis +RUN pgxn install --verbose parray_gin +RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl +RUN pgxn install --verbose pg_roaringbitmap +RUN pgxn install --verbose pg_rowalesce +RUN pgxn install --verbose pg_uuidv7 +RUN pgxn install --verbose pg_xenophile +RUN pgxn install --verbose pg_xxhash +RUN pgxn install --verbose pgsql_tweaks {{ if env.version | startswith("16") then ( -}} # sqlite_fdw not supported on pg16 yet @@ -181,20 +196,43 @@ RUN pgxn install pgsql_tweaks RUN USE_PGXS=1 pgxn install sqlite_fdw {{ ) end -}} -RUN git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ - && cd postgres_dba \ - && rm -rf .git +FROM builder as builder-other -#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 -# -# -------------------------------------------------------------- +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 set -eux \ + && 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 -eux \ + && 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 set -eux \ + && git clone --depth 1 https://github.com/NikolayS/postgres_dba.git \ + && cd postgres_dba \ + && rm -rf .git FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} @@ -205,12 +243,11 @@ 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 \ +RUN set -eux \ && sed -i -e 's/# \(.*\.UTF-8\)/\1/' /etc/locale.gen \ && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ \ @@ -312,18 +349,31 @@ 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 \ +RUN set -eux \ && 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) \ +RUN set -eux \ + && 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 ; \ @@ -331,14 +381,14 @@ RUN llvm_count=$(dpkg -l | grep llvm | wc -l) \ fi # add MobilityDB requirements -RUN set -eux; \ - cp -v /usr/share/postgresql/postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample.orig; \ +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.debian.template b/Dockerfile.debian.template index ef8a47bc..0d37b61c 100644 --- a/Dockerfile.debian.template +++ b/Dockerfile.debian.template @@ -7,7 +7,8 @@ LABEL maintainer="PostGIS Project - https://postgis.net" \ ENV POSTGIS_MAJOR {{ .[env.variant].POSTGIS_MAJOR }} ENV POSTGIS_VERSION {{ .[env.variant].POSTGIS_VERSION }} -RUN apt-get update \ +RUN set -eux \ + && apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ # ca-certificates: for accessing remote raster files; diff --git a/Dockerfile.master.template b/Dockerfile.master.template index d19f95a9..c8fdf1d2 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 \ +RUN set -eux \ && 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 \ +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_PROJ_REPOSITORY +ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} +ARG PGIS1_PROJ_CHECKOUT +ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} +RUN set -eux \ && 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} -RUN set -ex \ +ARG PGIS1_GEOS_REPOSITORY +ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} +ARG PGIS1_GEOS_CHECKOUT +ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} +RUN set -eux \ && 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 \ +RUN set -eux \ && 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 \ @@ -279,7 +298,7 @@ RUN set -ex \ && rm -fr /usr/src/gdal # Minimal command line test. -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -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 \ +RUN set -eux \ && 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,29 +373,37 @@ 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 \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ @@ -391,14 +418,12 @@ 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 set -eux \ + && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen -RUN set -ex \ +RUN set -eux \ && apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ @@ -436,8 +461,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 \ @@ -516,7 +541,7 @@ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh COPY ./update-postgis.sh /usr/local/bin # last final test -RUN set -ex \ +RUN set -eux \ && ldconfig \ && cs2cs \ && ldd $(which gdalinfo) \ 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 4b078daa..41c97885 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-07) +## Versions (2023-10-14) 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 a3353f1d..3f3da3ac 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", - "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", - "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", + "template": "Dockerfile.bundle0.template", + "MOBILITYDB_CHECKOUT": "tags/v1.1.0-beta1", + "MOBILITYDB_CHECKOUT_SHA1": "641d0818542acbfadbfbb54b131a3af75f8dc809", "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", + "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", - "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", - "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", + "template": "Dockerfile.bundle0.template", + "MOBILITYDB_CHECKOUT": "tags/v1.1.0-beta1", + "MOBILITYDB_CHECKOUT_SHA1": "641d0818542acbfadbfbb54b131a3af75f8dc809", "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", + "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": "b178091a9833febf41d6d9f388804a414a26421a", + "POSTGIS_CHECKOUT_SHA1": "b178091a9833febf41d6d9f388804a414a26421a", "CGAL_CHECKOUT": "3c8e2053721271119499506ea1d8a49dee89e30c", "CGAL_CHECKOUT_SHA1": "3c8e2053721271119499506ea1d8a49dee89e30c", - "SFCGAL_CHECKOUT": "35f72d2f52b4253013201b170467757b0fc355e5", - "SFCGAL_CHECKOUT_SHA1": "35f72d2f52b4253013201b170467757b0fc355e5", - "PROJ_CHECKOUT": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "PROJ_CHECKOUT_SHA1": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "GDAL_CHECKOUT": "2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4", - "GDAL_CHECKOUT_SHA1": "2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4", + "SFCGAL_CHECKOUT": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "SFCGAL_CHECKOUT_SHA1": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "PROJ_CHECKOUT": "61003c9550925bcfc7c0ab37f3c64fc6c29c46a4", + "PROJ_CHECKOUT_SHA1": "61003c9550925bcfc7c0ab37f3c64fc6c29c46a4", + "GDAL_CHECKOUT": "7c78481624c632a996915195b298190c23c3cc2e", + "GDAL_CHECKOUT_SHA1": "7c78481624c632a996915195b298190c23c3cc2e", "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", - "MOBILITYDB_CHECKOUT": "tags/v1.1.0-alpha", - "MOBILITYDB_CHECKOUT_SHA1": "ae74a3f12757a768942c6a38ed774323bcd446ec", + "template": "Dockerfile.bundle0.template", + "MOBILITYDB_CHECKOUT": "tags/v1.1.0-beta1", + "MOBILITYDB_CHECKOUT_SHA1": "641d0818542acbfadbfbb54b131a3af75f8dc809", "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", + "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": "b178091a9833febf41d6d9f388804a414a26421a", + "POSTGIS_CHECKOUT_SHA1": "b178091a9833febf41d6d9f388804a414a26421a", "CGAL_CHECKOUT": "3c8e2053721271119499506ea1d8a49dee89e30c", "CGAL_CHECKOUT_SHA1": "3c8e2053721271119499506ea1d8a49dee89e30c", - "SFCGAL_CHECKOUT": "35f72d2f52b4253013201b170467757b0fc355e5", - "SFCGAL_CHECKOUT_SHA1": "35f72d2f52b4253013201b170467757b0fc355e5", - "PROJ_CHECKOUT": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "PROJ_CHECKOUT_SHA1": "2040e685f5ab9c2958b7b611f5aaafee21fed82f", - "GDAL_CHECKOUT": "2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4", - "GDAL_CHECKOUT_SHA1": "2cf3921a088d42d6840a8b18e5ce7b994d4e9cf4", + "SFCGAL_CHECKOUT": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "SFCGAL_CHECKOUT_SHA1": "34f5a2e5e91a730121128f75d2ef4b55bb8e2afa", + "PROJ_CHECKOUT": "61003c9550925bcfc7c0ab37f3c64fc6c29c46a4", + "PROJ_CHECKOUT_SHA1": "61003c9550925bcfc7c0ab37f3c64fc6c29c46a4", + "GDAL_CHECKOUT": "7c78481624c632a996915195b298190c23c3cc2e", + "GDAL_CHECKOUT_SHA1": "7c78481624c632a996915195b298190c23c3cc2e", "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 1f88cf6f..378e054c 100755 --- a/versions.sh +++ b/versions.sh @@ -1,4 +1,5 @@ #!/bin/bash +# shellcheck disable=SC2154 set -Eeuo pipefail # Source environment variables and necessary configurations @@ -152,40 +153,63 @@ 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 - echo "[+] Checking lastversion : $repo_id - $repo_url" + 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 " " + + if [ -z "$last_version" ]; then + echo "[-] Error: could not get the latest version tag! Stopping!" + exit 1 + fi + + if [ -z "$sha1_value" ]; then + echo "[-] Error: could not get the SHA1 hash for the latest version tag! Stopping!" + exit 1 + fi } get_latest_version_and_hash "https://github.com/MobilityDB/MobilityDB" "mobilitydb" -get_latest_version_and_hash "https://github.com/pramsey/pgsql-http" "pgsql_http" -get_latest_version_and_hash "https://github.com/pramsey/pgsql-gzip" "pgsql_gzip" +get_latest_version_and_hash "https://github.com/pramsey/pgsql-http" "pgsql_http" +get_latest_version_and_hash "https://github.com/pramsey/pgsql-gzip" "pgsql_gzip" get_latest_version_and_hash "https://github.com/timescale/timescaledb" "timescaledb" -get_latest_version_and_hash "https://github.com/postgis/postgis" "postgis" -get_latest_version_and_hash "https://github.com/CGAL/cgal" "cgal" -get_latest_version_and_hash "https://github.com/libgeos/geos" "geos" -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/postgis/postgis" "postgis" +get_latest_version_and_hash "https://github.com/CGAL/cgal" "cgal" +get_latest_version_and_hash "https://github.com/libgeos/geos" "geos" +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 #------------------------------------------- @@ -324,7 +348,7 @@ for version in "${versions[@]}"; do fi echo " " - if [[ "master" == "$postgisVersion" || "recentstack" == "$postgisVersion" ]]; then + if [[ "master" == "$postgisVersion" || "recent" == "$postgisVersion" ]]; then srcVersion="" srcSha256="" srcSha1="" @@ -374,13 +398,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}]}" @@ -422,8 +446,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 @@ -433,8 +457,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 @@ -442,7 +466,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 @@ -488,7 +512,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" @@ -533,6 +557,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]}" @@ -554,7 +584,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 @@ -569,7 +599,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