diff --git a/.circleci/config.yml b/.circleci/config.yml index 1cab849d1..f464ba66d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,9 @@ version: 2.1 orbs: # https://circleci.com/developer/orbs/orb/circleci/docker - docker: circleci/docker@2.7.1 + docker: circleci/docker@2.8.1 # https://circleci.com/developer/orbs/orb/circleci/python - python: circleci/python@2.1.1 + python: circleci/python@3.0.0 # https://circleci.com/developer/orbs/orb/circleci/shellcheck shellcheck: circleci/shellcheck@3.2.0 @@ -17,7 +17,7 @@ jobs: # Note: Include parallel GitHub CI jobs when calculating the total load, as they run simultaneously! parallelism: 8 machine: - image: ubuntu-2204:current + image: ubuntu-2404:current resource_class: arm.large environment: BUILDX_PLATFORMS: linux/arm64v8 @@ -58,7 +58,7 @@ jobs: - run: docker --version - run: docker info - run: pip3 install --upgrade pip - - run: pip3 install --upgrade lastversion + - run: pip3 install --upgrade lastversion check-jsonschema - run: tools/install_manifest-tool.sh - run: tools/install_dive.sh - run: tools/environment_init.sh @@ -126,54 +126,52 @@ workflows: # hence they must be generated within the bundle JOB. # #circleci-targets-start - "12-3.3-alpine3.20", - "12-3.4-alpine3.19", - "12-3.4-alpine3.20", - "12-3.4-bookworm", - "12-3.4-bullseye", - "12-3.5-alpine3.19", - "12-3.5-alpine3.20", - "13-3.3-alpine3.20", - "13-3.4-alpine3.19", - "13-3.4-alpine3.20", - "13-3.4-bookworm", - "13-3.4-bullseye", - "13-3.5-alpine3.19", - "13-3.5-alpine3.20", - "14-3.3-alpine3.20", - "14-3.4-alpine3.19", - "14-3.4-alpine3.20", - "14-3.4-bookworm", - "14-3.4-bullseye", - "14-3.5-alpine3.19", - "14-3.5-alpine3.20", + "13-3.3-alpine3.21", + "13-3.4-alpine3.21", + "13-3.4-alpine3.22", + "13-3.5-alpine3.21", + "13-3.5-alpine3.22", + "13-3.5-bookworm", + "13-3.5-bullseye", + "14-3.3-alpine3.21", + "14-3.4-alpine3.21", + "14-3.4-alpine3.22", + "14-3.5-alpine3.21", + "14-3.5-alpine3.22", + "14-3.5-bookworm", + "14-3.5-bullseye", "14-l3.1.9gcp-bookworm", - "15-3.3-alpine3.20", - "15-3.4-alpine3.19", - "15-3.4-alpine3.20", -# --skip-- "15-3.4-bookworm", --> generated with the related bundle job! - "15-3.4-bullseye", - "15-3.4-bundle0-bookworm", - "15-3.5-alpine3.19", - "15-3.5-alpine3.20", - "15-master-bookworm", - "15-recent-bookworm", - "16-3.3-alpine3.20", - "16-3.4-alpine3.19", - "16-3.4-alpine3.20", -# --skip-- "16-3.4-bookworm", --> generated with the related bundle job! - "16-3.4-bullseye", - "16-3.4-bundle0-bookworm", - "16-3.5-alpine3.19", - "16-3.5-alpine3.20", - "16-l3.5.0rc1-bookworm", + "15-3.3-alpine3.21", + "15-3.4-alpine3.21", + "15-3.4-alpine3.22", + "15-3.5-alpine3.21", + "15-3.5-alpine3.22", + "15-3.5-bookworm", + "15-3.5-bullseye", + "16-3.3-alpine3.21", + "16-3.4-alpine3.21", + "16-3.4-alpine3.22", + "16-3.5-alpine3.21", + "16-3.5-alpine3.22", +# --skip-- "16-3.5-bookworm", --> generated with the related bundle job! + "16-3.5-bullseye", + "16-3.5-bundle0-bookworm", "16-master-bookworm", "16-recent-bookworm", - "17rc1-3.4-alpine3.20", - "17rc1-3.5-alpine3.19", - "17rc1-3.5-alpine3.20", - "17rc1-l3.5.0rc1-bookworm", - "17rc1-master-bookworm", - "17rc1-recent-bookworm", + "17-3.4-alpine3.21", + "17-3.4-alpine3.22", + "17-3.5-alpine3.21", + "17-3.5-alpine3.22", +# --skip-- "17-3.5-bookworm", --> generated with the related bundle job! + "17-3.5-bullseye", + "17-3.5-bundle0-bookworm", + "17-3.6-alpine3.22", + "17-master-bookworm", + "17-recent-bookworm", + "18-3.5-alpine3.22", + "18-3.5-bookworm", + "18-3.6-alpine3.22", + "18-master-bookworm", + "18-recent-bookworm", #circleci-targets-end ] diff --git a/.dockerignore b/.dockerignore index 6f46be0cc..7337eb52b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,3 +19,6 @@ apply-*.sh trivy_cache tmp/ + +venv-docker-postgis/ +tools/dive \ No newline at end of file diff --git a/.github/workflows/localtest.yml b/.github/workflows/localtest.yml index 96fe531e8..add6075c9 100644 --- a/.github/workflows/localtest.yml +++ b/.github/workflows/localtest.yml @@ -9,13 +9,13 @@ on: jobs: localtest: name: "testing ./localtest.sh ( update.sh and build test and push to local registry )" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - run: docker ps -a - run: pip3 install --upgrade pip - - run: pip3 install --upgrade lastversion + - run: pip3 install --upgrade lastversion check-jsonschema - run: tools/install_manifest-tool.sh - run: tools/environment_init.sh - - run: ./localtest.sh + - run: tools/localtest.sh - run: docker images diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da233f713..524befde4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,59 +27,57 @@ jobs: # hence they must be generated within the bundle JOB. # #matrix-include-start - - { version: "12-3.3", variant: "alpine3.20" } - - { version: "12-3.4", variant: "alpine3.19" } - - { version: "12-3.4", variant: "alpine3.20" } - - { version: "12-3.4", variant: "bookworm" } - - { version: "12-3.4", variant: "bullseye" } - - { version: "12-3.5", variant: "alpine3.19" } - - { version: "12-3.5", variant: "alpine3.20" } - - { version: "13-3.3", variant: "alpine3.20" } - - { version: "13-3.4", variant: "alpine3.19" } - - { version: "13-3.4", variant: "alpine3.20" } - - { version: "13-3.4", variant: "bookworm" } - - { version: "13-3.4", variant: "bullseye" } - - { version: "13-3.5", variant: "alpine3.19" } - - { version: "13-3.5", variant: "alpine3.20" } - - { version: "14-3.3", variant: "alpine3.20" } - - { version: "14-3.4", variant: "alpine3.19" } - - { version: "14-3.4", variant: "alpine3.20" } - - { version: "14-3.4", variant: "bookworm" } - - { version: "14-3.4", variant: "bullseye" } - - { version: "14-3.5", variant: "alpine3.19" } - - { version: "14-3.5", variant: "alpine3.20" } + - { version: "13-3.3", variant: "alpine3.21" } + - { version: "13-3.4", variant: "alpine3.21" } + - { version: "13-3.4", variant: "alpine3.22" } + - { version: "13-3.5", variant: "alpine3.21" } + - { version: "13-3.5", variant: "alpine3.22" } + - { version: "13-3.5", variant: "bookworm" } + - { version: "13-3.5", variant: "bullseye" } + - { version: "14-3.3", variant: "alpine3.21" } + - { version: "14-3.4", variant: "alpine3.21" } + - { version: "14-3.4", variant: "alpine3.22" } + - { version: "14-3.5", variant: "alpine3.21" } + - { version: "14-3.5", variant: "alpine3.22" } + - { version: "14-3.5", variant: "bookworm" } + - { version: "14-3.5", variant: "bullseye" } - { version: "14-l3.1.9gcp", variant: "bookworm" } - - { version: "15-3.3", variant: "alpine3.20" } - - { version: "15-3.4", variant: "alpine3.19" } - - { version: "15-3.4", variant: "alpine3.20" } -# --skip-- - { version: "15-3.4", variant: "bookworm" } --> generated with the related bundle job! - - { version: "15-3.4", variant: "bullseye" } - - { version: "15-3.4-bundle0", variant: "bookworm" } - - { version: "15-3.5", variant: "alpine3.19" } - - { version: "15-3.5", variant: "alpine3.20" } - - { version: "15-master", variant: "bookworm" } - - { version: "15-recent", variant: "bookworm" } - - { version: "16-3.3", variant: "alpine3.20" } - - { version: "16-3.4", variant: "alpine3.19" } - - { version: "16-3.4", variant: "alpine3.20" } -# --skip-- - { version: "16-3.4", variant: "bookworm" } --> generated with the related bundle job! - - { version: "16-3.4", variant: "bullseye" } - - { version: "16-3.4-bundle0", variant: "bookworm" } - - { version: "16-3.5", variant: "alpine3.19" } - - { version: "16-3.5", variant: "alpine3.20" } - - { version: "16-l3.5.0rc1", variant: "bookworm" } + - { version: "15-3.3", variant: "alpine3.21" } + - { version: "15-3.4", variant: "alpine3.21" } + - { version: "15-3.4", variant: "alpine3.22" } + - { version: "15-3.5", variant: "alpine3.21" } + - { version: "15-3.5", variant: "alpine3.22" } + - { version: "15-3.5", variant: "bookworm" } + - { version: "15-3.5", variant: "bullseye" } + - { version: "16-3.3", variant: "alpine3.21" } + - { version: "16-3.4", variant: "alpine3.21" } + - { version: "16-3.4", variant: "alpine3.22" } + - { version: "16-3.5", variant: "alpine3.21" } + - { version: "16-3.5", variant: "alpine3.22" } +# --skip-- - { version: "16-3.5", variant: "bookworm" } --> generated with the related bundle job! + - { version: "16-3.5", variant: "bullseye" } + - { version: "16-3.5-bundle0", variant: "bookworm" } - { version: "16-master", variant: "bookworm" } - { version: "16-recent", variant: "bookworm" } - - { version: "17rc1-3.4", variant: "alpine3.20" } - - { version: "17rc1-3.5", variant: "alpine3.19" } - - { version: "17rc1-3.5", variant: "alpine3.20" } - - { version: "17rc1-l3.5.0rc1", variant: "bookworm" } - - { version: "17rc1-master", variant: "bookworm" } - - { version: "17rc1-recent", variant: "bookworm" } + - { version: "17-3.4", variant: "alpine3.21" } + - { version: "17-3.4", variant: "alpine3.22" } + - { version: "17-3.5", variant: "alpine3.21" } + - { version: "17-3.5", variant: "alpine3.22" } +# --skip-- - { version: "17-3.5", variant: "bookworm" } --> generated with the related bundle job! + - { version: "17-3.5", variant: "bullseye" } + - { version: "17-3.5-bundle0", variant: "bookworm" } + - { version: "17-3.6", variant: "alpine3.22" } + - { version: "17-master", variant: "bookworm" } + - { version: "17-recent", variant: "bookworm" } + - { version: "18-3.5", variant: "alpine3.22" } + - { version: "18-3.5", variant: "bookworm" } + - { version: "18-3.6", variant: "alpine3.22" } + - { version: "18-master", variant: "bookworm" } + - { version: "18-recent", variant: "bookworm" } #matrix-include-end name: "${{ matrix.version }}-${{ matrix.variant }} docker image" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 continue-on-error: ${{ endsWith(matrix.version, '-master') }} env: PLATFORM: linux/amd64 @@ -91,7 +89,7 @@ jobs: uses: actions/checkout@v4 - run: pip3 install --upgrade pip - - run: pip3 install --upgrade lastversion + - run: pip3 install --upgrade lastversion check-jsonschema - run: tools/install_manifest-tool.sh - run: tools/install_dive.sh - run: tools/environment_init.sh @@ -177,7 +175,7 @@ jobs: make-readme: name: update readme needs: make-docker-images - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: PLATFORM: linux/amd64 DOCKER_BUILDKIT: '1' @@ -188,7 +186,7 @@ jobs: uses: actions/checkout@v4 - run: pip3 install --upgrade pip - - run: pip3 install --upgrade lastversion + - run: pip3 install --upgrade lastversion check-jsonschema - run: tools/install_manifest-tool.sh - run: tools/environment_init.sh - run: make check_version diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index aca5fb60f..5d1f0c8fe 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -7,7 +7,7 @@ on: jobs: shellcheck: name: Shellcheck - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Run ShellCheck diff --git a/.github/workflows/test_manifest.yml b/.github/workflows/test_manifest.yml new file mode 100644 index 000000000..8afc57b9b --- /dev/null +++ b/.github/workflows/test_manifest.yml @@ -0,0 +1,484 @@ +name: Multi-Architecture Docker Manifest Test + +on: + workflow_dispatch: + inputs: + push_images: + description: 'Push images to registry' + required: false + default: true + type: boolean + additional_registries: + description: 'Additional registries (comma-separated, e.g., ghcr.io,quay.io)' + required: false + default: '' + type: string + push: + paths: + - '.github/workflows/test_manifest.yml' + - '18-3.5/bookworm/**' + - '18-3.6/alpine3.22/**' + pull_request: + paths: + - '.github/workflows/test_manifest.yml' + - '18-3.5/bookworm/**' + - '18-3.6/alpine3.22/**' + +defaults: + run: + shell: bash + +env: + DOCKER_BUILDKIT: '1' + REGISTRY: 'docker.io' + REPO_NAME: 'imresamu' + IMAGE_NAME: 'postgistest' + +jobs: + build-images: + strategy: + fail-fast: false + matrix: + include: + # 18-3.5/bookworm builds + - image_dir: "18-3.5/bookworm" + target: "linux/amd64" + runner: "ubuntu-22.04" + arch_variant: "amd64" + - image_dir: "18-3.5/bookworm" + target: "linux/arm64" + runner: "ubuntu-22.04-arm" + arch_variant: "arm64" +# - image_dir: "18-3.5/bookworm" +# target: "linux/arm/v6" +# runner: "ubuntu-22.04-arm" +# arch_variant: "armv6" +# - image_dir: "18-3.5/bookworm" +# target: "linux/arm/v7" +# runner: "ubuntu-22.04-arm" +# arch_variant: "armv7" + + # 18-3.6/alpine3.22 builds + - image_dir: "18-3.6/alpine3.22" + target: "linux/amd64" + runner: "ubuntu-22.04" + arch_variant: "amd64" + - image_dir: "18-3.6/alpine3.22" + target: "linux/arm64" + runner: "ubuntu-22.04-arm" + arch_variant: "arm64" +# - image_dir: "18-3.6/alpine3.22" +# target: "linux/arm/v6" +# runner: "ubuntu-22.04-arm" +# arch_variant: "armv6" +# - image_dir: "18-3.6/alpine3.22" +# target: "linux/arm/v7" +# runner: "ubuntu-22.04-arm" +# arch_variant: "armv7" + + # Future architecture support + # - target: "linux/mips64le" + # runner: "ubuntu-22.04" + # arch_variant: "mips64le" + # - target: "linux/ppc64le" + # runner: "ubuntu-22.04" + # arch_variant: "ppc64le" + # - target: "linux/s390x" + # runner: "ubuntu-22.04" + # arch_variant: "s390x" + # - target: "linux/386" + # runner: "ubuntu-22.04" + # arch_variant: "386" + + name: "Build ${{ matrix.image_dir }} for ${{ matrix.arch_variant }}" + runs-on: ${{ matrix.runner }} + continue-on-error: false + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up QEMU for cross-platform builds + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + install: true + driver-opts: network=host + + - name: Install build dependencies + run: | + set -x + pip3 install --upgrade pip lastversion check-jsonschema + tools/install_manifest-tool.sh + tools/environment_init.sh + + - name: Check Docker Hub credentials + if: ${{ inputs.push_images }} + run: | + set -x + [[ -n "${{ secrets.DOCKERHUB_USERNAME }}" ]] || { echo "DOCKERHUB_USERNAME missing"; exit 1; } + [[ -n "${{ secrets.DOCKERHUB_ACCESS_TOKEN }}" ]] || { echo "DOCKERHUB_ACCESS_TOKEN missing"; exit 1; } + + - name: Login to Docker Hub + uses: docker/login-action@v3 + if: ${{ inputs.push_images && (github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch') }} + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Login to additional registries + if: ${{ inputs.push_images && inputs.additional_registries != '' }} + run: | + set -x + IFS=',' read -ra REGISTRIES <<< "${{ inputs.additional_registries }}" + for registry in "${REGISTRIES[@]}"; do + registry=$(echo "$registry" | xargs) + case "$registry" in + "ghcr.io") + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + ;; + "quay.io") + if [[ -n "${{ secrets.QUAY_USERNAME }}" && -n "${{ secrets.QUAY_TOKEN }}" ]]; then + echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u "${{ secrets.QUAY_USERNAME }}" --password-stdin + else + echo "Quay.io credentials not configured, skipping" + fi + ;; + *) + echo "Registry $registry not supported, skipping" + ;; + esac + done + + - name: Read tags from directory + id: read-tags + run: | + set -x + TAGS_FILE="${{ matrix.image_dir }}/tags" + [[ -f "$TAGS_FILE" ]] || { echo "Tags file not found: $TAGS_FILE"; exit 1; } + cat "$TAGS_FILE" + TAGS=$(cat "$TAGS_FILE" | tr ' ' '\n' | sed '/^$/d' | jq -R . | jq -s . | jq -c .) + echo "tags<> $GITHUB_OUTPUT + echo "$TAGS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Generate Docker build tags + id: generate-tags + run: | + set -x + TAGS_JSON='${{ steps.read-tags.outputs.tags }}' + DOCKER_TAGS="" + ALL_REGISTRIES="${{ env.REGISTRY }}" + + if [[ -n "${{ inputs.additional_registries }}" ]]; then + IFS=',' read -ra ADDITIONAL <<< "${{ inputs.additional_registries }}" + for reg in "${ADDITIONAL[@]}"; do + reg=$(echo "$reg" | xargs) + ALL_REGISTRIES="$ALL_REGISTRIES,$reg" + done + fi + + IFS=',' read -ra REGISTRIES <<< "$ALL_REGISTRIES" + for registry in "${REGISTRIES[@]}"; do + registry=$(echo "$registry" | xargs) + for tag in $(echo "$TAGS_JSON" | jq -r '.[]'); do + case "$registry" in + "ghcr.io") + FULL_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${{ matrix.arch_variant }}:${tag}" + ;; + "quay.io") + FULL_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${{ matrix.arch_variant }}:${tag}" + ;; + *) + FULL_TAG="$registry/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}-${{ matrix.arch_variant }}:${tag}" + ;; + esac + + [[ -z "$DOCKER_TAGS" ]] && DOCKER_TAGS="$FULL_TAG" || DOCKER_TAGS="$DOCKER_TAGS,$FULL_TAG" + done + done + + echo "docker_tags=$DOCKER_TAGS" >> $GITHUB_OUTPUT + echo "Generated tags:" + echo "$DOCKER_TAGS" | tr ',' '\n' + + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + context: ${{ matrix.image_dir }} + file: ${{ matrix.image_dir }}/Dockerfile + platforms: ${{ matrix.target }} + push: false + load: true + tags: ${{ steps.generate-tags.outputs.docker_tags }} + cache-from: type=gha + cache-to: type=gha,mode=max + provenance: false + sbom: false + build-args: | + BUILDKIT_INLINE_CACHE=1 + + + - name: List docker images + run: docker images + + - name: Test built image with official test suite + run: | + set -x + FIRST_TAG=$(echo '${{ steps.read-tags.outputs.tags }}' | jq -r '.[0]') + TEST_IMAGE="${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}-${{ matrix.arch_variant }}:${FIRST_TAG}" + + # Set platform for non-native architectures + case "${{ matrix.target }}" in + "linux/arm/v6"|"linux/arm/v7") + export DOCKER_DEFAULT_PLATFORM="${{ matrix.target }}" + echo "Testing with DOCKER_DEFAULT_PLATFORM=${{ matrix.target }}" + ;; + *) + echo "Testing natively for ${{ matrix.target }}" + ;; + esac + + git clone --depth 1 https://github.com/docker-library/official-images.git + + [[ -f "./official-images/test/run.sh" ]] || { echo "./official-images/test/run.sh not found"; exit 1; } + [[ -f "./test/postgis-config.sh" ]] || { echo "./test/postgis-config.sh not found"; exit 1; } + [[ -f "./official-images/test/config.sh" ]] || { echo "./official-images/test/config.sh not found"; exit 1; } + + ./official-images/test/run.sh -c ./official-images/test/config.sh -c test/postgis-config.sh "$TEST_IMAGE" + + - name: Push Docker image + if: ${{ inputs.push_images && (github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch') }} + run: | + set -x + # Reuse tags from generate-tags step + echo '${{ steps.generate-tags.outputs.docker_tags }}' | tr ',' '\n' | while read -r tag; do + docker push "$tag" + done + + create-manifests: + name: "Create Multi-Arch Manifests" + needs: build-images + runs-on: ubuntu-22.04 + if: ${{ inputs.push_images && (github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch') }} + + strategy: + matrix: + image_dir: + - "18-3.5/bookworm" + - "18-3.6/alpine3.22" + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Login to additional registries + if: ${{ inputs.additional_registries != '' }} + run: | + set -x + IFS=',' read -ra REGISTRIES <<< "${{ inputs.additional_registries }}" + for registry in "${REGISTRIES[@]}"; do + registry=$(echo "$registry" | xargs) + case "$registry" in + "ghcr.io") + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + ;; + "quay.io") + if [[ -n "${{ secrets.QUAY_USERNAME }}" && -n "${{ secrets.QUAY_TOKEN }}" ]]; then + echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u "${{ secrets.QUAY_USERNAME }}" --password-stdin + else + echo "Quay.io credentials not configured, skipping" + fi + ;; + esac + done + + - name: Read original tags + id: read-original-tags + run: | + set -x + TAGS_FILE="${{ matrix.image_dir }}/tags" + [[ -f "$TAGS_FILE" ]] || { echo "Tags file not found"; exit 1; } + cat "$TAGS_FILE" + TAGS=$(cat "$TAGS_FILE" | tr ' ' '\n' | sed '/^$/d' | jq -R . | jq -s . | jq -c .) + echo "tags<> $GITHUB_OUTPUT + echo "$TAGS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Create and push multi-architecture manifests + run: | + set -x + TAGS_JSON='${{ steps.read-original-tags.outputs.tags }}' + ARCHITECTURES=("amd64" "arm64") + #### not used "armv6" "armv7" ### + + ALL_REGISTRIES="${{ env.REGISTRY }}" + [[ -n "${{ inputs.additional_registries }}" ]] && ALL_REGISTRIES="$ALL_REGISTRIES,${{ inputs.additional_registries }}" + + IFS=',' read -ra REGISTRIES <<< "$ALL_REGISTRIES" + + for registry in "${REGISTRIES[@]}"; do + registry=$(echo "$registry" | xargs) + for tag in $(echo "$TAGS_JSON" | jq -r '.[]'); do + case "$registry" in + "ghcr.io") + MANIFEST_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${tag}" + ;; + "quay.io") + MANIFEST_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${tag}" + ;; + *) + MANIFEST_TAG="$registry/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${tag}" + ;; + esac + + docker manifest rm "$MANIFEST_TAG" 2>/dev/null || true + + MANIFEST_CMD="docker manifest create --amend $MANIFEST_TAG" + for arch in "${ARCHITECTURES[@]}"; do + case "$registry" in + "ghcr.io") + ARCH_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + "quay.io") + ARCH_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + *) + ARCH_TAG="$registry/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + esac + MANIFEST_CMD="$MANIFEST_CMD $ARCH_TAG" + done + eval "$MANIFEST_CMD" + + for arch in "${ARCHITECTURES[@]}"; do + case "$registry" in + "ghcr.io") + ARCH_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + "quay.io") + ARCH_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + *) + ARCH_TAG="$registry/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}-${arch}:${tag}" + ;; + esac + case "$arch" in + "amd64") + docker manifest annotate "$MANIFEST_TAG" "$ARCH_TAG" --os linux --arch amd64 + ;; + "arm64") + docker manifest annotate "$MANIFEST_TAG" "$ARCH_TAG" --os linux --arch arm64 + ;; + "armv6") + docker manifest annotate "$MANIFEST_TAG" "$ARCH_TAG" --os linux --arch arm --variant v6 + ;; + "armv7") + docker manifest annotate "$MANIFEST_TAG" "$ARCH_TAG" --os linux --arch arm --variant v7 + ;; + esac + done + + docker manifest push "$MANIFEST_TAG" + docker manifest inspect "$MANIFEST_TAG" | jq '.manifests[] | {platform: .platform, digest: .digest}' + done + done + + - name: Test multi-architecture manifests + run: | + set -x + FIRST_TAG=$(echo '${{ steps.read-original-tags.outputs.tags }}' | jq -r '.[0]') + + ALL_REGISTRIES="${{ env.REGISTRY }}" + [[ -n "${{ inputs.additional_registries }}" ]] && ALL_REGISTRIES="$ALL_REGISTRIES,${{ inputs.additional_registries }}" + + IFS=',' read -ra REGISTRIES <<< "$ALL_REGISTRIES" + + for registry in "${REGISTRIES[@]}"; do + registry=$(echo "$registry" | xargs) + + case "$registry" in + "ghcr.io") + MANIFEST_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${FIRST_TAG}" + ;; + "quay.io") + MANIFEST_TAG="$registry/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${FIRST_TAG}" + ;; + *) + MANIFEST_TAG="$registry/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${FIRST_TAG}" + ;; + esac + + MANIFEST_INFO=$(docker manifest inspect "$MANIFEST_TAG") + EXPECTED_ARCHS=4 + ACTUAL_ARCHS=$(echo "$MANIFEST_INFO" | jq '.manifests | length') + + if [[ "$ACTUAL_ARCHS" -eq "$EXPECTED_ARCHS" ]]; then + echo "$registry manifest OK: $ACTUAL_ARCHS/$EXPECTED_ARCHS architectures" + else + echo "$registry manifest ERROR: $ACTUAL_ARCHS/$EXPECTED_ARCHS architectures" + exit 1 + fi + done + + summary: + name: "Build Summary" + needs: [build-images, create-manifests] + runs-on: ubuntu-22.04 + if: always() + + steps: + - name: Generate summary + run: | + cat >> $GITHUB_STEP_SUMMARY << 'EOF' + ## Multi-Architecture Docker Build Summary + + ### Build Results + EOF + + if [[ "${{ needs.build-images.result }}" == "success" ]]; then + echo "- Individual Architecture Builds: SUCCESS" >> $GITHUB_STEP_SUMMARY + else + echo "- Individual Architecture Builds: FAILED" >> $GITHUB_STEP_SUMMARY + fi + + if [[ "${{ needs.create-manifests.result }}" == "success" ]]; then + echo "- Multi-Architecture Manifests: SUCCESS" >> $GITHUB_STEP_SUMMARY + elif [[ "${{ needs.create-manifests.result }}" == "skipped" ]]; then + echo "- Multi-Architecture Manifests: SKIPPED" >> $GITHUB_STEP_SUMMARY + else + echo "- Multi-Architecture Manifests: FAILED" >> $GITHUB_STEP_SUMMARY + fi + + cat >> $GITHUB_STEP_SUMMARY << 'EOF' + + ### Architecture Support & Testing + - linux/amd64: ubuntu-22.04 (native testing) + - linux/arm64: ubuntu-22.04-arm (native testing) + + ### Images Built + - 18-3.5/bookworm: PostgreSQL 18beta1 + PostGIS 3.5 (Debian) + - 18-3.6/alpine3.22: PostgreSQL 18beta1 + PostGIS 3.6.0alpha1 (Alpine) + + ### Registry Configuration + EOF + + echo "- Primary Registry: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}" >> $GITHUB_STEP_SUMMARY + + if [[ -n "${{ inputs.additional_registries }}" ]]; then + echo "- Additional Registries: ${{ inputs.additional_registries }}" >> $GITHUB_STEP_SUMMARY + else + echo "- Additional Registries: None" >> $GITHUB_STEP_SUMMARY + fi + + echo "- Push Images: ${{ inputs.push_images && 'Enabled' || 'Disabled' }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 8bc44af3f..2a333b4bf 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -11,7 +11,7 @@ env: jobs: update_dockerfiles: name: "update_dockerfiles" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: @@ -24,12 +24,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - run: pip3 install --upgrade pip - - run: pip3 install --upgrade lastversion + - run: pip3 install --upgrade lastversion check-jsonschema - run: tools/install_manifest-tool.sh - run: tools/environment_init.sh - run: ./update.sh - run: git status - run: git diff versions.json + - run: check-jsonschema --schemafile versions.schema.json versions.json - name: Check if versions.json changed id: version_check @@ -64,8 +65,8 @@ jobs: # https://github.com/peter-evans/create-pull-request - name: Create Pull Request if: env.versions_changed == 'true' && steps.check_prs.outputs.create_pr == 'true' - id: create-pr - uses: peter-evans/create-pull-request@v6 + id: create-pr + uses: peter-evans/create-pull-request@v7 with: committer: GitHub author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> @@ -97,10 +98,9 @@ jobs: gh pr close $PR_NUMBER --comment "Closing to trigger full CI/CD pipeline" sleep 5 # Wait for 5 seconds to ensure the PR is fully closed gh pr reopen $PR_NUMBER --comment "Reopening to trigger full CI/CD pipeline" - + - name: Comment PR if: steps.create-pr.outputs.pull-request-number run: | PR_NUMBER=${{ steps.create-pr.outputs.pull-request-number }} gh pr comment $PR_NUMBER --body "This PR was automatically created and reopened by the update_dockerfiles workflow to trigger the full CI/CD pipeline. Please review the changes carefully." - \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8d160c2d7..70e8c3c68 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ _* .vscode/ trivy_cache -tmp/ \ No newline at end of file +tmp/ +_cache/ +venv-docker-postgis/ +tools/dive \ No newline at end of file diff --git a/12-3.3/alpine3.20/Dockerfile b/12-3.3/alpine3.20/Dockerfile deleted file mode 100644 index e01034f2b..000000000 --- a/12-3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.7 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=a0c796766cbcd369d871283f559fd97a186464dd - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.3/alpine3.20/tags b/12-3.3/alpine3.20/tags deleted file mode 100644 index 7eb40ee52..000000000 --- a/12-3.3/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.3-alpine3.20 12-3.3.7-alpine3.20 12-3.3-alpine diff --git a/12-3.4/alpine3.19/Dockerfile b/12-3.4/alpine3.19/Dockerfile deleted file mode 100644 index ae2edca0f..000000000 --- a/12-3.4/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.4/alpine3.19/tags b/12-3.4/alpine3.19/tags deleted file mode 100644 index d18b20ca4..000000000 --- a/12-3.4/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.4-alpine3.19 12-3.4.3-alpine3.19 diff --git a/12-3.4/alpine3.20/Dockerfile b/12-3.4/alpine3.20/Dockerfile deleted file mode 100644 index a2ca0ee0d..000000000 --- a/12-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.4/alpine3.20/tags b/12-3.4/alpine3.20/tags deleted file mode 100644 index 0dfba80e4..000000000 --- a/12-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.4-alpine3.20 12-3.4.3-alpine3.20 12-3.4-alpine diff --git a/12-3.4/bookworm/Dockerfile b/12-3.4/bookworm/Dockerfile deleted file mode 100644 index 3743e48b7..000000000 --- a/12-3.4/bookworm/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:12-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg120+1 spatial database extension with PostgreSQL 12 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg120+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.4/bookworm/tags b/12-3.4/bookworm/tags deleted file mode 100644 index 0088f5ff7..000000000 --- a/12-3.4/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.4-bookworm 12-3.4.2-bookworm 12-3.4 diff --git a/12-3.4/bullseye/Dockerfile b/12-3.4/bullseye/Dockerfile deleted file mode 100644 index 3bf932ca1..000000000 --- a/12-3.4/bullseye/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:12-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 12 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg110+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.4/bullseye/tags b/12-3.4/bullseye/tags deleted file mode 100644 index 26c97b435..000000000 --- a/12-3.4/bullseye/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.4-bullseye 12-3.4.2-bullseye diff --git a/12-3.5/alpine3.19/Dockerfile b/12-3.5/alpine3.19/Dockerfile deleted file mode 100644 index fe0242cfc..000000000 --- a/12-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.5/alpine3.19/tags b/12-3.5/alpine3.19/tags deleted file mode 100644 index a553ba9d5..000000000 --- a/12-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.5.0rc1-alpine3.19 diff --git a/12-3.5/alpine3.20/Dockerfile b/12-3.5/alpine3.20/Dockerfile deleted file mode 100644 index 43d043882..000000000 --- a/12-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:12-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 12 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.5/alpine3.20/tags b/12-3.5/alpine3.20/tags deleted file mode 100644 index 7e104ef28..000000000 --- a/12-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -12-3.5.0rc1-alpine3.20 12-3.5.0rc1-alpine diff --git a/13-3.3/alpine3.20/Dockerfile b/13-3.3/alpine3.20/Dockerfile deleted file mode 100644 index 6a9c61d1e..000000000 --- a/13-3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.7 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=a0c796766cbcd369d871283f559fd97a186464dd - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.3/alpine3.20/tags b/13-3.3/alpine3.20/tags deleted file mode 100644 index 6a58d94ef..000000000 --- a/13-3.3/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.3-alpine3.20 13-3.3.7-alpine3.20 13-3.3-alpine diff --git a/13-3.3/alpine3.21/Dockerfile b/13-3.3/alpine3.21/Dockerfile new file mode 100644 index 000000000..018bfa79c --- /dev/null +++ b/13-3.3/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.8 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=cfb70d6229096d2474d79d097768dd19ef04a840 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.3.8" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.3.8" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/12-3.3/alpine3.20/initdb-postgis.sh b/13-3.3/alpine3.21/initdb-postgis.sh similarity index 100% rename from 12-3.3/alpine3.20/initdb-postgis.sh rename to 13-3.3/alpine3.21/initdb-postgis.sh diff --git a/13-3.3/alpine3.21/tags b/13-3.3/alpine3.21/tags new file mode 100644 index 000000000..e0c9d84cf --- /dev/null +++ b/13-3.3/alpine3.21/tags @@ -0,0 +1 @@ +13-3.3-alpine3.21 13-3.3.8-alpine3.21 diff --git a/12-3.3/alpine3.20/update-postgis.sh b/13-3.3/alpine3.21/update-postgis.sh similarity index 100% rename from 12-3.3/alpine3.20/update-postgis.sh rename to 13-3.3/alpine3.21/update-postgis.sh diff --git a/13-3.4/alpine3.19/Dockerfile b/13-3.4/alpine3.19/Dockerfile deleted file mode 100644 index c8ac8cdc4..000000000 --- a/13-3.4/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.4/alpine3.19/tags b/13-3.4/alpine3.19/tags deleted file mode 100644 index d455e2cf5..000000000 --- a/13-3.4/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.4-alpine3.19 13-3.4.3-alpine3.19 diff --git a/13-3.4/alpine3.20/Dockerfile b/13-3.4/alpine3.20/Dockerfile deleted file mode 100644 index 52dc445f8..000000000 --- a/13-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.4/alpine3.20/tags b/13-3.4/alpine3.20/tags deleted file mode 100644 index fc62a43ec..000000000 --- a/13-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.4-alpine3.20 13-3.4.3-alpine3.20 13-3.4-alpine diff --git a/13-3.4/alpine3.21/Dockerfile b/13-3.4/alpine3.21/Dockerfile new file mode 100644 index 000000000..117b3c7a3 --- /dev/null +++ b/13-3.4/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/12-3.4/alpine3.19/initdb-postgis.sh b/13-3.4/alpine3.21/initdb-postgis.sh similarity index 100% rename from 12-3.4/alpine3.19/initdb-postgis.sh rename to 13-3.4/alpine3.21/initdb-postgis.sh diff --git a/13-3.4/alpine3.21/tags b/13-3.4/alpine3.21/tags new file mode 100644 index 000000000..7e94d0d91 --- /dev/null +++ b/13-3.4/alpine3.21/tags @@ -0,0 +1 @@ +13-3.4-alpine3.21 13-3.4.4-alpine3.21 diff --git a/12-3.4/alpine3.19/update-postgis.sh b/13-3.4/alpine3.21/update-postgis.sh similarity index 100% rename from 12-3.4/alpine3.19/update-postgis.sh rename to 13-3.4/alpine3.21/update-postgis.sh diff --git a/13-3.4/alpine3.22/Dockerfile b/13-3.4/alpine3.22/Dockerfile new file mode 100644 index 000000000..e4b5b93c9 --- /dev/null +++ b/13-3.4/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/12-3.4/alpine3.20/initdb-postgis.sh b/13-3.4/alpine3.22/initdb-postgis.sh similarity index 100% rename from 12-3.4/alpine3.20/initdb-postgis.sh rename to 13-3.4/alpine3.22/initdb-postgis.sh diff --git a/13-3.4/alpine3.22/tags b/13-3.4/alpine3.22/tags new file mode 100644 index 000000000..007526bf5 --- /dev/null +++ b/13-3.4/alpine3.22/tags @@ -0,0 +1 @@ +13-3.4-alpine3.22 13-3.4.4-alpine3.22 13-3.4-alpine diff --git a/12-3.4/alpine3.20/update-postgis.sh b/13-3.4/alpine3.22/update-postgis.sh similarity index 100% rename from 12-3.4/alpine3.20/update-postgis.sh rename to 13-3.4/alpine3.22/update-postgis.sh diff --git a/13-3.4/bookworm/Dockerfile b/13-3.4/bookworm/Dockerfile deleted file mode 100644 index 12020cf16..000000000 --- a/13-3.4/bookworm/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:13-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg120+1 spatial database extension with PostgreSQL 13 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg120+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.4/bookworm/tags b/13-3.4/bookworm/tags deleted file mode 100644 index d35a8e788..000000000 --- a/13-3.4/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.4-bookworm 13-3.4.2-bookworm 13-3.4 diff --git a/13-3.4/bullseye/Dockerfile b/13-3.4/bullseye/Dockerfile deleted file mode 100644 index a554eb21f..000000000 --- a/13-3.4/bullseye/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:13-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 13 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg110+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.4/bullseye/tags b/13-3.4/bullseye/tags deleted file mode 100644 index 37db47727..000000000 --- a/13-3.4/bullseye/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.4-bullseye 13-3.4.2-bullseye diff --git a/13-3.5/alpine3.19/Dockerfile b/13-3.5/alpine3.19/Dockerfile deleted file mode 100644 index e5e90ba0c..000000000 --- a/13-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.5/alpine3.19/tags b/13-3.5/alpine3.19/tags deleted file mode 100644 index 6ea49c4a3..000000000 --- a/13-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.5.0rc1-alpine3.19 diff --git a/13-3.5/alpine3.20/Dockerfile b/13-3.5/alpine3.20/Dockerfile deleted file mode 100644 index b548e1a4e..000000000 --- a/13-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.5/alpine3.20/tags b/13-3.5/alpine3.20/tags deleted file mode 100644 index d581587dc..000000000 --- a/13-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -13-3.5.0rc1-alpine3.20 13-3.5.0rc1-alpine diff --git a/13-3.5/alpine3.21/Dockerfile b/13-3.5/alpine3.21/Dockerfile new file mode 100644 index 000000000..926e950f8 --- /dev/null +++ b/13-3.5/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/12-3.4/bookworm/initdb-postgis.sh b/13-3.5/alpine3.21/initdb-postgis.sh similarity index 100% rename from 12-3.4/bookworm/initdb-postgis.sh rename to 13-3.5/alpine3.21/initdb-postgis.sh diff --git a/13-3.5/alpine3.21/tags b/13-3.5/alpine3.21/tags new file mode 100644 index 000000000..feaaf4678 --- /dev/null +++ b/13-3.5/alpine3.21/tags @@ -0,0 +1 @@ +13-3.5-alpine3.21 13-3.5.3-alpine3.21 diff --git a/12-3.4/bookworm/update-postgis.sh b/13-3.5/alpine3.21/update-postgis.sh similarity index 100% rename from 12-3.4/bookworm/update-postgis.sh rename to 13-3.5/alpine3.21/update-postgis.sh diff --git a/13-3.5/alpine3.22/Dockerfile b/13-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..e7b0b301b --- /dev/null +++ b/13-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:13-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 13 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/12-3.4/bullseye/initdb-postgis.sh b/13-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 12-3.4/bullseye/initdb-postgis.sh rename to 13-3.5/alpine3.22/initdb-postgis.sh diff --git a/13-3.5/alpine3.22/tags b/13-3.5/alpine3.22/tags new file mode 100644 index 000000000..0aea81a6d --- /dev/null +++ b/13-3.5/alpine3.22/tags @@ -0,0 +1 @@ +13-3.5-alpine3.22 13-3.5.3-alpine3.22 13-3.5-alpine diff --git a/12-3.4/bullseye/update-postgis.sh b/13-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 12-3.4/bullseye/update-postgis.sh rename to 13-3.5/alpine3.22/update-postgis.sh diff --git a/13-3.5/bookworm/Dockerfile b/13-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..a1405ee02 --- /dev/null +++ b/13-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:13-bookworm +ARG PGIS1_POSTGRES_MAJOR=13 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.5/alpine3.19/initdb-postgis.sh b/13-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 12-3.5/alpine3.19/initdb-postgis.sh rename to 13-3.5/bookworm/initdb-postgis.sh diff --git a/13-3.5/bookworm/tags b/13-3.5/bookworm/tags new file mode 100644 index 000000000..68bb74be7 --- /dev/null +++ b/13-3.5/bookworm/tags @@ -0,0 +1 @@ +13-3.5-bookworm 13-3.5.3-bookworm 13-3.5 diff --git a/12-3.5/alpine3.19/update-postgis.sh b/13-3.5/bookworm/update-postgis.sh similarity index 100% rename from 12-3.5/alpine3.19/update-postgis.sh rename to 13-3.5/bookworm/update-postgis.sh diff --git a/13-3.5/bullseye/Dockerfile b/13-3.5/bullseye/Dockerfile new file mode 100644 index 000000000..518f11058 --- /dev/null +++ b/13-3.5/bullseye/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:13-bullseye +ARG PGIS1_POSTGRES_MAJOR=13 +ARG PGIS1_POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3.5/alpine3.20/initdb-postgis.sh b/13-3.5/bullseye/initdb-postgis.sh similarity index 100% rename from 12-3.5/alpine3.20/initdb-postgis.sh rename to 13-3.5/bullseye/initdb-postgis.sh diff --git a/13-3.5/bullseye/tags b/13-3.5/bullseye/tags new file mode 100644 index 000000000..e73b91587 --- /dev/null +++ b/13-3.5/bullseye/tags @@ -0,0 +1 @@ +13-3.5-bullseye 13-3.5.2-bullseye diff --git a/12-3.5/alpine3.20/update-postgis.sh b/13-3.5/bullseye/update-postgis.sh similarity index 100% rename from 12-3.5/alpine3.20/update-postgis.sh rename to 13-3.5/bullseye/update-postgis.sh diff --git a/14-3.3/alpine3.20/Dockerfile b/14-3.3/alpine3.20/Dockerfile deleted file mode 100644 index c5a4ddbbb..000000000 --- a/14-3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.7 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=a0c796766cbcd369d871283f559fd97a186464dd - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.3/alpine3.20/tags b/14-3.3/alpine3.20/tags deleted file mode 100644 index 6347df270..000000000 --- a/14-3.3/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.3-alpine3.20 14-3.3.7-alpine3.20 14-3.3-alpine diff --git a/14-3.3/alpine3.21/Dockerfile b/14-3.3/alpine3.21/Dockerfile new file mode 100644 index 000000000..9d435b65e --- /dev/null +++ b/14-3.3/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.8 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=cfb70d6229096d2474d79d097768dd19ef04a840 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.3.8" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.3.8" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/13-3.3/alpine3.20/initdb-postgis.sh b/14-3.3/alpine3.21/initdb-postgis.sh similarity index 100% rename from 13-3.3/alpine3.20/initdb-postgis.sh rename to 14-3.3/alpine3.21/initdb-postgis.sh diff --git a/14-3.3/alpine3.21/tags b/14-3.3/alpine3.21/tags new file mode 100644 index 000000000..ee59f5760 --- /dev/null +++ b/14-3.3/alpine3.21/tags @@ -0,0 +1 @@ +14-3.3-alpine3.21 14-3.3.8-alpine3.21 diff --git a/13-3.3/alpine3.20/update-postgis.sh b/14-3.3/alpine3.21/update-postgis.sh similarity index 100% rename from 13-3.3/alpine3.20/update-postgis.sh rename to 14-3.3/alpine3.21/update-postgis.sh diff --git a/14-3.4/alpine3.19/Dockerfile b/14-3.4/alpine3.19/Dockerfile deleted file mode 100644 index 8ac8c3bd6..000000000 --- a/14-3.4/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.4/alpine3.19/tags b/14-3.4/alpine3.19/tags deleted file mode 100644 index 769999303..000000000 --- a/14-3.4/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.4-alpine3.19 14-3.4.3-alpine3.19 diff --git a/14-3.4/alpine3.20/Dockerfile b/14-3.4/alpine3.20/Dockerfile deleted file mode 100644 index c8629edb5..000000000 --- a/14-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.4/alpine3.20/tags b/14-3.4/alpine3.20/tags deleted file mode 100644 index 3a70b7587..000000000 --- a/14-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.4-alpine3.20 14-3.4.3-alpine3.20 14-3.4-alpine diff --git a/14-3.4/alpine3.21/Dockerfile b/14-3.4/alpine3.21/Dockerfile new file mode 100644 index 000000000..562526676 --- /dev/null +++ b/14-3.4/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/13-3.4/alpine3.19/initdb-postgis.sh b/14-3.4/alpine3.21/initdb-postgis.sh similarity index 100% rename from 13-3.4/alpine3.19/initdb-postgis.sh rename to 14-3.4/alpine3.21/initdb-postgis.sh diff --git a/14-3.4/alpine3.21/tags b/14-3.4/alpine3.21/tags new file mode 100644 index 000000000..ae61d44a4 --- /dev/null +++ b/14-3.4/alpine3.21/tags @@ -0,0 +1 @@ +14-3.4-alpine3.21 14-3.4.4-alpine3.21 diff --git a/13-3.4/alpine3.19/update-postgis.sh b/14-3.4/alpine3.21/update-postgis.sh similarity index 100% rename from 13-3.4/alpine3.19/update-postgis.sh rename to 14-3.4/alpine3.21/update-postgis.sh diff --git a/14-3.4/alpine3.22/Dockerfile b/14-3.4/alpine3.22/Dockerfile new file mode 100644 index 000000000..b051253ef --- /dev/null +++ b/14-3.4/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/13-3.4/alpine3.20/initdb-postgis.sh b/14-3.4/alpine3.22/initdb-postgis.sh similarity index 100% rename from 13-3.4/alpine3.20/initdb-postgis.sh rename to 14-3.4/alpine3.22/initdb-postgis.sh diff --git a/14-3.4/alpine3.22/tags b/14-3.4/alpine3.22/tags new file mode 100644 index 000000000..969e16bcd --- /dev/null +++ b/14-3.4/alpine3.22/tags @@ -0,0 +1 @@ +14-3.4-alpine3.22 14-3.4.4-alpine3.22 14-3.4-alpine diff --git a/13-3.4/alpine3.20/update-postgis.sh b/14-3.4/alpine3.22/update-postgis.sh similarity index 100% rename from 13-3.4/alpine3.20/update-postgis.sh rename to 14-3.4/alpine3.22/update-postgis.sh diff --git a/14-3.4/bookworm/Dockerfile b/14-3.4/bookworm/Dockerfile deleted file mode 100644 index 58d9c8854..000000000 --- a/14-3.4/bookworm/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:14-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg120+1 spatial database extension with PostgreSQL 14 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg120+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.4/bookworm/tags b/14-3.4/bookworm/tags deleted file mode 100644 index f44af9937..000000000 --- a/14-3.4/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.4-bookworm 14-3.4.2-bookworm 14-3.4 diff --git a/14-3.4/bullseye/Dockerfile b/14-3.4/bullseye/Dockerfile deleted file mode 100644 index 45a609314..000000000 --- a/14-3.4/bullseye/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:14-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 14 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg110+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.4/bullseye/tags b/14-3.4/bullseye/tags deleted file mode 100644 index cd8bb9fee..000000000 --- a/14-3.4/bullseye/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.4-bullseye 14-3.4.2-bullseye diff --git a/14-3.5/alpine3.19/Dockerfile b/14-3.5/alpine3.19/Dockerfile deleted file mode 100644 index fabb66ae0..000000000 --- a/14-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.5/alpine3.19/tags b/14-3.5/alpine3.19/tags deleted file mode 100644 index 8d27cf16b..000000000 --- a/14-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.5.0rc1-alpine3.19 diff --git a/14-3.5/alpine3.20/Dockerfile b/14-3.5/alpine3.20/Dockerfile deleted file mode 100644 index e30b93c02..000000000 --- a/14-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.5/alpine3.20/tags b/14-3.5/alpine3.20/tags deleted file mode 100644 index 681addef1..000000000 --- a/14-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -14-3.5.0rc1-alpine3.20 14-3.5.0rc1-alpine diff --git a/14-3.5/alpine3.21/Dockerfile b/14-3.5/alpine3.21/Dockerfile new file mode 100644 index 000000000..ae5a74512 --- /dev/null +++ b/14-3.5/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/13-3.4/bookworm/initdb-postgis.sh b/14-3.5/alpine3.21/initdb-postgis.sh similarity index 100% rename from 13-3.4/bookworm/initdb-postgis.sh rename to 14-3.5/alpine3.21/initdb-postgis.sh diff --git a/14-3.5/alpine3.21/tags b/14-3.5/alpine3.21/tags new file mode 100644 index 000000000..bba48bf67 --- /dev/null +++ b/14-3.5/alpine3.21/tags @@ -0,0 +1 @@ +14-3.5-alpine3.21 14-3.5.3-alpine3.21 diff --git a/13-3.4/bookworm/update-postgis.sh b/14-3.5/alpine3.21/update-postgis.sh similarity index 100% rename from 13-3.4/bookworm/update-postgis.sh rename to 14-3.5/alpine3.21/update-postgis.sh diff --git a/14-3.5/alpine3.22/Dockerfile b/14-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..22983afa9 --- /dev/null +++ b/14-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:14-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 14 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/13-3.4/bullseye/initdb-postgis.sh b/14-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 13-3.4/bullseye/initdb-postgis.sh rename to 14-3.5/alpine3.22/initdb-postgis.sh diff --git a/14-3.5/alpine3.22/tags b/14-3.5/alpine3.22/tags new file mode 100644 index 000000000..c5f2885c6 --- /dev/null +++ b/14-3.5/alpine3.22/tags @@ -0,0 +1 @@ +14-3.5-alpine3.22 14-3.5.3-alpine3.22 14-3.5-alpine diff --git a/13-3.4/bullseye/update-postgis.sh b/14-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 13-3.4/bullseye/update-postgis.sh rename to 14-3.5/alpine3.22/update-postgis.sh diff --git a/14-3.5/bookworm/Dockerfile b/14-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..3bdd2c63c --- /dev/null +++ b/14-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:14-bookworm +ARG PGIS1_POSTGRES_MAJOR=14 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.5/alpine3.19/initdb-postgis.sh b/14-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 13-3.5/alpine3.19/initdb-postgis.sh rename to 14-3.5/bookworm/initdb-postgis.sh diff --git a/14-3.5/bookworm/tags b/14-3.5/bookworm/tags new file mode 100644 index 000000000..6d9be9be5 --- /dev/null +++ b/14-3.5/bookworm/tags @@ -0,0 +1 @@ +14-3.5-bookworm 14-3.5.3-bookworm 14-3.5 diff --git a/13-3.5/alpine3.19/update-postgis.sh b/14-3.5/bookworm/update-postgis.sh similarity index 100% rename from 13-3.5/alpine3.19/update-postgis.sh rename to 14-3.5/bookworm/update-postgis.sh diff --git a/14-3.5/bullseye/Dockerfile b/14-3.5/bullseye/Dockerfile new file mode 100644 index 000000000..574b0977e --- /dev/null +++ b/14-3.5/bullseye/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:14-bullseye +ARG PGIS1_POSTGRES_MAJOR=14 +ARG PGIS1_POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/13-3.5/alpine3.20/initdb-postgis.sh b/14-3.5/bullseye/initdb-postgis.sh similarity index 100% rename from 13-3.5/alpine3.20/initdb-postgis.sh rename to 14-3.5/bullseye/initdb-postgis.sh diff --git a/14-3.5/bullseye/tags b/14-3.5/bullseye/tags new file mode 100644 index 000000000..ef08ff440 --- /dev/null +++ b/14-3.5/bullseye/tags @@ -0,0 +1 @@ +14-3.5-bullseye 14-3.5.2-bullseye diff --git a/13-3.5/alpine3.20/update-postgis.sh b/14-3.5/bullseye/update-postgis.sh similarity index 100% rename from 13-3.5/alpine3.20/update-postgis.sh rename to 14-3.5/bullseye/update-postgis.sh diff --git a/14-l3.1.9gcp/bookworm/Dockerfile b/14-l3.1.9gcp/bookworm/Dockerfile index 46b4663a7..b788011ef 100644 --- a/14-l3.1.9gcp/bookworm/Dockerfile +++ b/14-l3.1.9gcp/bookworm/Dockerfile @@ -1,6 +1,6 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! @@ -8,6 +8,10 @@ ARG PGIS1_BASE_IMAGE=postgres:14-bookworm +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + 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 @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=minimal" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -378,9 +391,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ org.opencontainers.image.description="PostGIS - 14-l3.1.9gcp spatial database extension with PostgreSQL 14 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="14-l3.1.9gcp" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 14-l3.1.9gcp spatial database extension with PostgreSQL 14 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="14-l3.1.9gcp" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -391,7 +421,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -573,6 +606,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/15-3.3/alpine3.20/Dockerfile b/15-3.3/alpine3.20/Dockerfile deleted file mode 100644 index 8f32ed134..000000000 --- a/15-3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.7 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=a0c796766cbcd369d871283f559fd97a186464dd - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.3/alpine3.20/tags b/15-3.3/alpine3.20/tags deleted file mode 100644 index 7708eed1c..000000000 --- a/15-3.3/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.3-alpine3.20 15-3.3.7-alpine3.20 15-3.3-alpine diff --git a/15-3.3/alpine3.21/Dockerfile b/15-3.3/alpine3.21/Dockerfile new file mode 100644 index 000000000..a557898d8 --- /dev/null +++ b/15-3.3/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.8 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=cfb70d6229096d2474d79d097768dd19ef04a840 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.3.8" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.3.8" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/14-3.3/alpine3.20/initdb-postgis.sh b/15-3.3/alpine3.21/initdb-postgis.sh similarity index 100% rename from 14-3.3/alpine3.20/initdb-postgis.sh rename to 15-3.3/alpine3.21/initdb-postgis.sh diff --git a/15-3.3/alpine3.21/tags b/15-3.3/alpine3.21/tags new file mode 100644 index 000000000..6f838a72c --- /dev/null +++ b/15-3.3/alpine3.21/tags @@ -0,0 +1 @@ +15-3.3-alpine3.21 15-3.3.8-alpine3.21 diff --git a/14-3.3/alpine3.20/update-postgis.sh b/15-3.3/alpine3.21/update-postgis.sh similarity index 100% rename from 14-3.3/alpine3.20/update-postgis.sh rename to 15-3.3/alpine3.21/update-postgis.sh diff --git a/15-3.4-bundle0/bookworm/tags b/15-3.4-bundle0/bookworm/tags deleted file mode 100644 index 487b1a6b9..000000000 --- a/15-3.4-bundle0/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-bundle0-bookworm 15-3.4.2-bundle0-bookworm 15-3.4-bundle0 diff --git a/15-3.4/alpine3.19/Dockerfile b/15-3.4/alpine3.19/Dockerfile deleted file mode 100644 index 31b739472..000000000 --- a/15-3.4/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.4/alpine3.19/tags b/15-3.4/alpine3.19/tags deleted file mode 100644 index 9561d271b..000000000 --- a/15-3.4/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-alpine3.19 15-3.4.3-alpine3.19 diff --git a/15-3.4/alpine3.20/Dockerfile b/15-3.4/alpine3.20/Dockerfile deleted file mode 100644 index ae9feee1c..000000000 --- a/15-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.4/alpine3.20/tags b/15-3.4/alpine3.20/tags deleted file mode 100644 index f1d9a97a2..000000000 --- a/15-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-alpine3.20 15-3.4.3-alpine3.20 15-3.4-alpine diff --git a/15-3.4/alpine3.21/Dockerfile b/15-3.4/alpine3.21/Dockerfile new file mode 100644 index 000000000..bc3efd664 --- /dev/null +++ b/15-3.4/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/14-3.4/alpine3.19/initdb-postgis.sh b/15-3.4/alpine3.21/initdb-postgis.sh similarity index 100% rename from 14-3.4/alpine3.19/initdb-postgis.sh rename to 15-3.4/alpine3.21/initdb-postgis.sh diff --git a/15-3.4/alpine3.21/tags b/15-3.4/alpine3.21/tags new file mode 100644 index 000000000..effe2085b --- /dev/null +++ b/15-3.4/alpine3.21/tags @@ -0,0 +1 @@ +15-3.4-alpine3.21 15-3.4.4-alpine3.21 diff --git a/14-3.4/alpine3.19/update-postgis.sh b/15-3.4/alpine3.21/update-postgis.sh similarity index 100% rename from 14-3.4/alpine3.19/update-postgis.sh rename to 15-3.4/alpine3.21/update-postgis.sh diff --git a/15-3.4/alpine3.22/Dockerfile b/15-3.4/alpine3.22/Dockerfile new file mode 100644 index 000000000..b0d46e954 --- /dev/null +++ b/15-3.4/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/14-3.4/alpine3.20/initdb-postgis.sh b/15-3.4/alpine3.22/initdb-postgis.sh similarity index 100% rename from 14-3.4/alpine3.20/initdb-postgis.sh rename to 15-3.4/alpine3.22/initdb-postgis.sh diff --git a/15-3.4/alpine3.22/tags b/15-3.4/alpine3.22/tags new file mode 100644 index 000000000..384e3bae3 --- /dev/null +++ b/15-3.4/alpine3.22/tags @@ -0,0 +1 @@ +15-3.4-alpine3.22 15-3.4.4-alpine3.22 15-3.4-alpine diff --git a/14-3.4/alpine3.20/update-postgis.sh b/15-3.4/alpine3.22/update-postgis.sh similarity index 100% rename from 14-3.4/alpine3.20/update-postgis.sh rename to 15-3.4/alpine3.22/update-postgis.sh diff --git a/15-3.4/bookworm/Dockerfile b/15-3.4/bookworm/Dockerfile deleted file mode 100644 index 85aeb569c..000000000 --- a/15-3.4/bookworm/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:15-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg120+1 spatial database extension with PostgreSQL 15 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg120+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.4/bookworm/tags b/15-3.4/bookworm/tags deleted file mode 100644 index f45fa473e..000000000 --- a/15-3.4/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-bookworm 15-3.4.2-bookworm 15-3.4 diff --git a/15-3.4/bullseye/Dockerfile b/15-3.4/bullseye/Dockerfile deleted file mode 100644 index 4a2d7ed74..000000000 --- a/15-3.4/bullseye/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:15-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 15 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg110+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.4/bullseye/tags b/15-3.4/bullseye/tags deleted file mode 100644 index ca554ec60..000000000 --- a/15-3.4/bullseye/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.4-bullseye 15-3.4.2-bullseye diff --git a/15-3.5/alpine3.19/Dockerfile b/15-3.5/alpine3.19/Dockerfile deleted file mode 100644 index 11c10ae67..000000000 --- a/15-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.5/alpine3.19/tags b/15-3.5/alpine3.19/tags deleted file mode 100644 index 84fcb6711..000000000 --- a/15-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.5.0rc1-alpine3.19 diff --git a/15-3.5/alpine3.20/Dockerfile b/15-3.5/alpine3.20/Dockerfile deleted file mode 100644 index e8a38674f..000000000 --- a/15-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.5/alpine3.20/tags b/15-3.5/alpine3.20/tags deleted file mode 100644 index a1a6cd67a..000000000 --- a/15-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -15-3.5.0rc1-alpine3.20 15-3.5.0rc1-alpine diff --git a/15-3.5/alpine3.21/Dockerfile b/15-3.5/alpine3.21/Dockerfile new file mode 100644 index 000000000..21769f1cf --- /dev/null +++ b/15-3.5/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/14-3.4/bookworm/initdb-postgis.sh b/15-3.5/alpine3.21/initdb-postgis.sh similarity index 100% rename from 14-3.4/bookworm/initdb-postgis.sh rename to 15-3.5/alpine3.21/initdb-postgis.sh diff --git a/15-3.5/alpine3.21/tags b/15-3.5/alpine3.21/tags new file mode 100644 index 000000000..b3f5aa56a --- /dev/null +++ b/15-3.5/alpine3.21/tags @@ -0,0 +1 @@ +15-3.5-alpine3.21 15-3.5.3-alpine3.21 diff --git a/14-3.4/bookworm/update-postgis.sh b/15-3.5/alpine3.21/update-postgis.sh similarity index 100% rename from 14-3.4/bookworm/update-postgis.sh rename to 15-3.5/alpine3.21/update-postgis.sh diff --git a/15-3.5/alpine3.22/Dockerfile b/15-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..400075e38 --- /dev/null +++ b/15-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:15-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 15 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/14-3.4/bullseye/initdb-postgis.sh b/15-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 14-3.4/bullseye/initdb-postgis.sh rename to 15-3.5/alpine3.22/initdb-postgis.sh diff --git a/15-3.5/alpine3.22/tags b/15-3.5/alpine3.22/tags new file mode 100644 index 000000000..6c8c94009 --- /dev/null +++ b/15-3.5/alpine3.22/tags @@ -0,0 +1 @@ +15-3.5-alpine3.22 15-3.5.3-alpine3.22 15-3.5-alpine diff --git a/14-3.4/bullseye/update-postgis.sh b/15-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 14-3.4/bullseye/update-postgis.sh rename to 15-3.5/alpine3.22/update-postgis.sh diff --git a/15-3.5/bookworm/Dockerfile b/15-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..7fc958aed --- /dev/null +++ b/15-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:15-bookworm +ARG PGIS1_POSTGRES_MAJOR=15 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.5/alpine3.19/initdb-postgis.sh b/15-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 14-3.5/alpine3.19/initdb-postgis.sh rename to 15-3.5/bookworm/initdb-postgis.sh diff --git a/15-3.5/bookworm/tags b/15-3.5/bookworm/tags new file mode 100644 index 000000000..78091337f --- /dev/null +++ b/15-3.5/bookworm/tags @@ -0,0 +1 @@ +15-3.5-bookworm 15-3.5.3-bookworm 15-3.5 diff --git a/14-3.5/alpine3.19/update-postgis.sh b/15-3.5/bookworm/update-postgis.sh similarity index 100% rename from 14-3.5/alpine3.19/update-postgis.sh rename to 15-3.5/bookworm/update-postgis.sh diff --git a/15-3.5/bullseye/Dockerfile b/15-3.5/bullseye/Dockerfile new file mode 100644 index 000000000..f38055051 --- /dev/null +++ b/15-3.5/bullseye/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:15-bullseye +ARG PGIS1_POSTGRES_MAJOR=15 +ARG PGIS1_POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/14-3.5/alpine3.20/initdb-postgis.sh b/15-3.5/bullseye/initdb-postgis.sh similarity index 100% rename from 14-3.5/alpine3.20/initdb-postgis.sh rename to 15-3.5/bullseye/initdb-postgis.sh diff --git a/15-3.5/bullseye/tags b/15-3.5/bullseye/tags new file mode 100644 index 000000000..e52a90c4f --- /dev/null +++ b/15-3.5/bullseye/tags @@ -0,0 +1 @@ +15-3.5-bullseye 15-3.5.2-bullseye diff --git a/14-3.5/alpine3.20/update-postgis.sh b/15-3.5/bullseye/update-postgis.sh similarity index 100% rename from 14-3.5/alpine3.20/update-postgis.sh rename to 15-3.5/bullseye/update-postgis.sh diff --git a/15-master/bookworm/tags b/15-master/bookworm/tags deleted file mode 100644 index 36ce3a2ac..000000000 --- a/15-master/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-master-bookworm 15-master diff --git a/15-recent/bookworm/tags b/15-recent/bookworm/tags deleted file mode 100644 index c7d537bec..000000000 --- a/15-recent/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -15-recent-bookworm 15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 15-recent diff --git a/16-3.3/alpine3.20/Dockerfile b/16-3.3/alpine3.20/Dockerfile deleted file mode 100644 index 2b803356f..000000000 --- a/16-3.3/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.7 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=a0c796766cbcd369d871283f559fd97a186464dd - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.3/alpine3.20/tags b/16-3.3/alpine3.20/tags deleted file mode 100644 index c34cf9302..000000000 --- a/16-3.3/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.3-alpine3.20 16-3.3.7-alpine3.20 16-3.3-alpine diff --git a/16-3.3/alpine3.21/Dockerfile b/16-3.3/alpine3.21/Dockerfile new file mode 100644 index 000000000..ba979dc61 --- /dev/null +++ b/16-3.3/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.3.8 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=cfb70d6229096d2474d79d097768dd19ef04a840 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.3.8" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.3.8" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-3.3/alpine3.20/initdb-postgis.sh b/16-3.3/alpine3.21/initdb-postgis.sh similarity index 100% rename from 15-3.3/alpine3.20/initdb-postgis.sh rename to 16-3.3/alpine3.21/initdb-postgis.sh diff --git a/16-3.3/alpine3.21/tags b/16-3.3/alpine3.21/tags new file mode 100644 index 000000000..2c98c09a9 --- /dev/null +++ b/16-3.3/alpine3.21/tags @@ -0,0 +1 @@ +16-3.3-alpine3.21 16-3.3.8-alpine3.21 diff --git a/15-3.3/alpine3.20/update-postgis.sh b/16-3.3/alpine3.21/update-postgis.sh similarity index 100% rename from 15-3.3/alpine3.20/update-postgis.sh rename to 16-3.3/alpine3.21/update-postgis.sh diff --git a/16-3.4-bundle0/bookworm/tags b/16-3.4-bundle0/bookworm/tags deleted file mode 100644 index 693b1526c..000000000 --- a/16-3.4-bundle0/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-bundle0-bookworm 16-3.4.2-bundle0-bookworm 16-3.4-bundle0 bundle0 diff --git a/16-3.4/alpine3.19/Dockerfile b/16-3.4/alpine3.19/Dockerfile deleted file mode 100644 index e7b68086e..000000000 --- a/16-3.4/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/alpine3.19/tags b/16-3.4/alpine3.19/tags deleted file mode 100644 index 2a2d42cbd..000000000 --- a/16-3.4/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-alpine3.19 16-3.4.3-alpine3.19 diff --git a/16-3.4/alpine3.20/Dockerfile b/16-3.4/alpine3.20/Dockerfile deleted file mode 100644 index 5b73f50d2..000000000 --- a/16-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/alpine3.20/tags b/16-3.4/alpine3.20/tags deleted file mode 100644 index 4ed961890..000000000 --- a/16-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-alpine3.20 16-3.4.3-alpine3.20 16-3.4-alpine alpine diff --git a/16-3.4/alpine3.21/Dockerfile b/16-3.4/alpine3.21/Dockerfile new file mode 100644 index 000000000..b8b6b993a --- /dev/null +++ b/16-3.4/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-3.4/alpine3.19/initdb-postgis.sh b/16-3.4/alpine3.21/initdb-postgis.sh similarity index 100% rename from 15-3.4/alpine3.19/initdb-postgis.sh rename to 16-3.4/alpine3.21/initdb-postgis.sh diff --git a/16-3.4/alpine3.21/tags b/16-3.4/alpine3.21/tags new file mode 100644 index 000000000..a47b0b923 --- /dev/null +++ b/16-3.4/alpine3.21/tags @@ -0,0 +1 @@ +16-3.4-alpine3.21 16-3.4.4-alpine3.21 diff --git a/15-3.4/alpine3.19/update-postgis.sh b/16-3.4/alpine3.21/update-postgis.sh similarity index 100% rename from 15-3.4/alpine3.19/update-postgis.sh rename to 16-3.4/alpine3.21/update-postgis.sh diff --git a/16-3.4/alpine3.22/Dockerfile b/16-3.4/alpine3.22/Dockerfile new file mode 100644 index 000000000..d6b9e62aa --- /dev/null +++ b/16-3.4/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-3.4/alpine3.20/initdb-postgis.sh b/16-3.4/alpine3.22/initdb-postgis.sh similarity index 100% rename from 15-3.4/alpine3.20/initdb-postgis.sh rename to 16-3.4/alpine3.22/initdb-postgis.sh diff --git a/16-3.4/alpine3.22/tags b/16-3.4/alpine3.22/tags new file mode 100644 index 000000000..0a3e028dc --- /dev/null +++ b/16-3.4/alpine3.22/tags @@ -0,0 +1 @@ +16-3.4-alpine3.22 16-3.4.4-alpine3.22 16-3.4-alpine diff --git a/15-3.4/alpine3.20/update-postgis.sh b/16-3.4/alpine3.22/update-postgis.sh similarity index 100% rename from 15-3.4/alpine3.20/update-postgis.sh rename to 16-3.4/alpine3.22/update-postgis.sh diff --git a/16-3.4/bookworm/Dockerfile b/16-3.4/bookworm/Dockerfile deleted file mode 100644 index 31d631904..000000000 --- a/16-3.4/bookworm/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:16-bookworm - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg120+1 spatial database extension with PostgreSQL 16 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg120+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/bookworm/tags b/16-3.4/bookworm/tags deleted file mode 100644 index 263a25f35..000000000 --- a/16-3.4/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-bookworm 16-3.4.2-bookworm 16-3.4 latest diff --git a/16-3.4/bullseye/Dockerfile b/16-3.4/bullseye/Dockerfile deleted file mode 100644 index 11921c37f..000000000 --- a/16-3.4/bullseye/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.debian.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -FROM postgres:16-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 16 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.2+dfsg-1.pgdg110+1 - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - postgis \ - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/bullseye/tags b/16-3.4/bullseye/tags deleted file mode 100644 index 925db2db4..000000000 --- a/16-3.4/bullseye/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.4-bullseye 16-3.4.2-bullseye diff --git a/16-3.4-bundle0/bookworm/Dockerfile b/16-3.5-bundle0/bookworm/Dockerfile similarity index 60% rename from 16-3.4-bundle0/bookworm/Dockerfile rename to 16-3.5-bundle0/bookworm/Dockerfile index 2589ffabd..dd41470c9 100644 --- a/16-3.4-bundle0/bookworm/Dockerfile +++ b/16-3.5-bundle0/bookworm/Dockerfile @@ -1,10 +1,9 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle0.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.bundle0.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. @@ -16,34 +15,27 @@ ARG REGISTRY=docker.io ARG REPO_NAME=imresamu ARG IMAGE_NAME=postgis-amd64 -ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm - -ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS1_MOBILITYDB_CHECKOUT=tags/v1.1.2 -ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=6088e7bc10a31dee34fbc3e3139288a218e4ec65 - -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 PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.5-bookworm 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 PGIS1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS1_TIMESCALEDB_CHECKOUT=tags/2.16.1 -ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1=7c78574c4d42ec7ceb840bd9d55652182221f251 - 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_1 ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=54b4b0358a6c96dc80b2b836bba50937415753b6 -ARG PGIS1_DUCKDB_CHECKOUT=tags/v1.1.1 +ARG PGIS1_DUCKDB_CHECKOUT=tags/v1.3.1 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" FROM ${PGIS1_BASE_IMAGE} AS builder ARG PGIS1_DUCKDB_CHECKOUT +ARG PGIS1_OPTIMIZATION_FLAGS RUN set -eux \ && apt-get update \ @@ -55,6 +47,7 @@ RUN set -eux \ build-essential \ cmake \ curl \ + flex \ g++ \ git \ make \ @@ -62,36 +55,20 @@ RUN set -eux \ 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 \ - # hydra (columnar) - liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw sqlite3 \ - # plv8 - ninja-build \ - pkg-config \ # bytemagic libmagic-dev \ # pgsoudium \ libsodium-dev \ + # pg_curl + libcurl4-gnutls-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -FROM builder as builder-http-gzip - -ARG PGIS1_PGSQL_HTTP_REPOSITORY -ARG PGIS1_PGSQL_HTTP_CHECKOUT -ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-gzip ARG PGIS1_PGSQL_GZIP_REPOSITORY ARG PGIS1_PGSQL_GZIP_CHECKOUT @@ -110,79 +87,6 @@ RUN set -eux \ && make -j$(nproc) \ && make install -RUN set -eux \ - && mkdir -p /pgsql-http \ - && cd pgsql-http \ - && git init \ - && 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)" != "$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 -eux \ - && mkdir -p /timescaledb \ - && cd timescaledb \ - && git init \ - && 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)" != "$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=${PGIS1_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 - -FROM builder as builder-mobilitydb - -ARG PGIS1_MOBILITYDB_REPOSITORY -ARG PGIS1_MOBILITYDB_CHECKOUT -ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 - -# Install MobilityDB -RUN set -eux \ - && mkdir -p /MobilityDB \ - && cd MobilityDB \ - && git init \ - && 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)" != "$PGIS1_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 - FROM builder as builder-pgxn @@ -191,8 +95,6 @@ RUN pgxn install --verbose ddlx RUN pgxn install --verbose dsef RUN pgxn install --verbose json_accessors RUN pgxn install --verbose lostgis - -#RUN pgxn install --verbose parray_gin # not working on CircleCI arm .. yet RUN pgxn install --verbose permuteseq RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl RUN pgxn install --verbose pg_roaringbitmap @@ -202,7 +104,19 @@ RUN pgxn install --verbose pg_xenophile RUN pgxn install --verbose pg_xxhash RUN pgxn install --verbose pgsodium RUN pgxn install --verbose pgsql_tweaks -RUN USE_PGXS=1 pgxn install sqlite_fdw +# RUN pgxn install --verbose sqlite_fdw + +# pg_duckdb +RUN set -eux \ + && curl -sfL https://install.pgx.sh -o /tmp/pgx-install.sh \ + && chmod +x /tmp/pgx-install.sh \ + && /tmp/pgx-install.sh \ + && rm /tmp/pgx-install.sh +RUN pgxman install pg_duckdb + +#RUN pgxman install hydra_columnar +#RUN pgxman install pgvectorscale +#RUN pgxman install pg_quack FROM builder as builder-other @@ -210,20 +124,6 @@ ARG PGIS1_PG_HINT_PLAN_REPOSITORY ARG PGIS1_PG_HINT_PLAN_CHECKOUT ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 -# Add hydradatabase -# TODO hydradatabase version! -RUN set -eux \ - && git clone --depth 1 https://github.com/hydradatabase/hydra \ - && cd hydra/columnar \ - && git checkout main \ - && export COLUMNAR_O3=1 \ - && ./configure \ - && make -j$(nproc) \ - && make install - -# # # pg_quack is not available for PG16 -# # - https://github.com/hydradatabase/pg_quack/issues/3 -# # install pg_hint_plan RUN set -eux \ && mkdir pg_hint_plan \ @@ -248,11 +148,42 @@ RUN set -eux \ && rm -rf .git #install: psql < /pg_svg/pg-svg-lib.sql -FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.4-bookworm +FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:16-3.5-bookworm -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS Bundle - 16-3.4-bookworm " \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_TIMESCALEDB_TELEMETRY + +# Export build environment for child images (enterprise-grade package version locking) +RUN set -eux \ + # Ensure docker-postgis-env.sh exists (create empty if missing) + && touch /usr/local/share/docker-postgis-env.sh \ + # Export bundle-specific build versions for child images + && echo "# Bundle0 Extension Versions" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_OPTIMIZATION_FLAGS='${PGIS1_OPTIMIZATION_FLAGS}'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PG_HINT_PLAN_CHECKOUT='tags/REL16_1_6_1'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_DUCKDB_CHECKOUT='tags/v1.3.1'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PGSQL_GZIP_CHECKOUT='tags/v1.0.0'" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + # Source the environment after populating it + && . /usr/local/share/docker-postgis-env.sh + +# Only override opencontainers labels for bundle-specific info +# org.postgis.base.* labels are inherited from base image and should NOT be overridden +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS Bundle - 16-3.5-bookworm with MobilityDB, TimescaleDB, DuckDB and 40+ extensions" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3+dfsg-1~exp1.pgdg120+1-bundle0" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # Bundle-specific additional extensions (base PostGIS extensions inherited from org.postgis.base.extensions) + org.postgis.bundle0.additional.extensions="timescaledb,mobilitydb,pgsql_http,pgsql_gzip,pgrouting,pgvector,h3,pointcloud,pgaudit,byteamagic,ddlx,dsef,json_accessors,lostgis,permuteseq,pg_curl,pg_roaringbitmap,pg_rowalesce,pg_uuidv7,pg_xenophile,pg_xxhash,pgsodium,pgsql_tweaks,sqlite_fdw,age,decoderbufs,asn1oid,extra_window_functions,first_last_agg,hll,hypopg,icu_ext,jsquery,numeral,ogr_fdw,partman,periods,pg_fact_loader,pg_failover_slots,pg_stat_kcache,pg_wait_sampling,pgl_ddl_deploy,pglogical,pgmp,pgpcre,pgq3,pgsphere,pgtap,pldebugger,plpgsql_check,prefix,prioritize,q3c,repack,rum,show_plans,squeeze" \ + org.postgis.bundle0.permanently.excluded="parray_gin,pg_quack" \ + org.postgis.bundle0.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.bundle0.timescaledb.telemetry="${PGIS1_TIMESCALEDB_TELEMETRY}" \ + org.postgis.bundle0.duckdb.version="tags/v1.3.1" # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization @@ -301,17 +232,24 @@ RUN set -eux \ pspg \ vip-manager \ \ + # add any exceptions for PG17 or PPG16 here + # PostgreSQL 16 and earlier packages + \ postgresql-$PG_MAJOR-age \ postgresql-$PG_MAJOR-asn1oid \ + postgresql-$PG_MAJOR-auto-failover \ + postgresql-$PG_MAJOR-credcheck \ postgresql-$PG_MAJOR-cron \ postgresql-$PG_MAJOR-decoderbufs \ postgresql-$PG_MAJOR-extra-window-functions \ postgresql-$PG_MAJOR-first-last-agg \ postgresql-$PG_MAJOR-h3 \ postgresql-$PG_MAJOR-hll \ + postgresql-$PG_MAJOR-http \ postgresql-$PG_MAJOR-hypopg \ postgresql-$PG_MAJOR-icu-ext \ postgresql-$PG_MAJOR-jsquery \ + postgresql-$PG_MAJOR-mobilitydb \ postgresql-$PG_MAJOR-numeral \ postgresql-$PG_MAJOR-ogr-fdw \ postgresql-$PG_MAJOR-partman \ @@ -341,8 +279,7 @@ RUN set -eux \ postgresql-$PG_MAJOR-rum \ postgresql-$PG_MAJOR-show-plans \ postgresql-$PG_MAJOR-squeeze \ - # add MobilityDb missing dependency from libgsl-dev - libgsl27 \ + postgresql-$PG_MAJOR-timescaledb \ # MeCab based tokenizer for pgdg-pgroonga groonga-tokenizer-mecab \ # bytemagic @@ -357,40 +294,42 @@ RUN set -eux \ ARG PGIS1_DUCKDB_CHECKOUT ENV PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT} RUN arch=$(uname -m) \ - && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed 's/tags\///') \ + && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed -E 's|^.*/||; s|^tags/||; s|^v||') \ && echo "DUCKDB_VERSION=${DUCKDB_VERSION}" \ && echo "PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT}" \ && case "$arch" in \ x86_64) \ duck_binary="duckdb_cli-linux-amd64.zip" ;; \ aarch64) \ - duck_binary="duckdb_cli-linux-aarch64.zip" ;; \ + duck_binary="duckdb_cli-linux-arm64.zip" ;; \ *) \ echo "Unsupported architecture: $arch"; exit 1 ;; \ esac \ - && wget https://github.com/duckdb/duckdb/releases/download/${DUCKDB_VERSION}/$duck_binary \ + && wget https://github.com/duckdb/duckdb/releases/download/v${DUCKDB_VERSION}/$duck_binary \ && unzip $duck_binary -d /usr/local/bin \ && rm $duck_binary \ && duckdb --version -# install extensions -# https://duckdb.org/docs/extensions/overview.html -ENV DUCKDB_EXTENSIONS="arrow autocomplete excel fts httpfs icu inet json parquet postgres_scanner spatial sqlite_scanner substrait tpcds tpch visualizer" +# install duckdb extensions +ENV DUCKDB_EXTENSIONS="excel fts httpfs inet postgres_scanner spatial sqlite_scanner tpcds tpch" RUN for e in ${DUCKDB_EXTENSIONS} ; do \ echo "Installing $e ..."; \ - duckdb -c "INSTALL $e;"; \ - echo "LOAD $e;" >> $HOME/.duckdbrc; \ - done + if duckdb -c "INSTALL $e;" 2>&1 | tee /tmp/duckdb-install-$e.log; then \ + echo "Successfully installed $e"; \ + echo "LOAD $e;" >> $HOME/.duckdbrc; \ + else \ + echo "Failed to install $e, check /tmp/duckdb-install-$e.log"; \ + fi; \ + done \ + # Add core extensions to .duckdbrc (these are built-in) + && echo "LOAD autocomplete;" >> $HOME/.duckdbrc \ + && echo "LOAD icu;" >> $HOME/.duckdbrc \ + && echo "LOAD json;" >> $HOME/.duckdbrc \ + && echo "LOAD parquet;" >> $HOME/.duckdbrc # 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-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-gzip /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 @@ -419,7 +358,7 @@ RUN set -eux \ 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 = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'postgis-3,pg_stat_statements,timescaledb'" >> /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/initdb-bundle0.sh b/16-3.5-bundle0/bookworm/initdb-bundle0.sh similarity index 100% rename from 15-3.4-bundle0/bookworm/initdb-bundle0.sh rename to 16-3.5-bundle0/bookworm/initdb-bundle0.sh diff --git a/16-3.5-bundle0/bookworm/tags b/16-3.5-bundle0/bookworm/tags new file mode 100644 index 000000000..7d7eb4495 --- /dev/null +++ b/16-3.5-bundle0/bookworm/tags @@ -0,0 +1 @@ +16-3.5-bundle0-bookworm 16-3.5.3-bundle0-bookworm 16-3.5-bundle0 diff --git a/16-3.5/alpine3.19/Dockerfile b/16-3.5/alpine3.19/Dockerfile deleted file mode 100644 index 054c4884e..000000000 --- a/16-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.5/alpine3.19/tags b/16-3.5/alpine3.19/tags deleted file mode 100644 index 9a921ab8e..000000000 --- a/16-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.5.0rc1-alpine3.19 diff --git a/16-3.5/alpine3.20/Dockerfile b/16-3.5/alpine3.20/Dockerfile deleted file mode 100644 index 83985b874..000000000 --- a/16-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.5/alpine3.20/tags b/16-3.5/alpine3.20/tags deleted file mode 100644 index 3bc2c924e..000000000 --- a/16-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -16-3.5.0rc1-alpine3.20 16-3.5.0rc1-alpine diff --git a/16-3.5/alpine3.21/Dockerfile b/16-3.5/alpine3.21/Dockerfile new file mode 100644 index 000000000..a0f6c54b7 --- /dev/null +++ b/16-3.5/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-3.4/bookworm/initdb-postgis.sh b/16-3.5/alpine3.21/initdb-postgis.sh similarity index 100% rename from 15-3.4/bookworm/initdb-postgis.sh rename to 16-3.5/alpine3.21/initdb-postgis.sh diff --git a/16-3.5/alpine3.21/tags b/16-3.5/alpine3.21/tags new file mode 100644 index 000000000..0091e1098 --- /dev/null +++ b/16-3.5/alpine3.21/tags @@ -0,0 +1 @@ +16-3.5-alpine3.21 16-3.5.3-alpine3.21 diff --git a/15-3.4/bookworm/update-postgis.sh b/16-3.5/alpine3.21/update-postgis.sh similarity index 100% rename from 15-3.4/bookworm/update-postgis.sh rename to 16-3.5/alpine3.21/update-postgis.sh diff --git a/16-3.5/alpine3.22/Dockerfile b/16-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..cfcd8c723 --- /dev/null +++ b/16-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:16-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 16 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-3.4/bullseye/initdb-postgis.sh b/16-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 15-3.4/bullseye/initdb-postgis.sh rename to 16-3.5/alpine3.22/initdb-postgis.sh diff --git a/16-3.5/alpine3.22/tags b/16-3.5/alpine3.22/tags new file mode 100644 index 000000000..c632febe0 --- /dev/null +++ b/16-3.5/alpine3.22/tags @@ -0,0 +1 @@ +16-3.5-alpine3.22 16-3.5.3-alpine3.22 16-3.5-alpine diff --git a/15-3.4/bullseye/update-postgis.sh b/16-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 15-3.4/bullseye/update-postgis.sh rename to 16-3.5/alpine3.22/update-postgis.sh diff --git a/16-3.5/bookworm/Dockerfile b/16-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..d5f2f7034 --- /dev/null +++ b/16-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:16-bookworm +ARG PGIS1_POSTGRES_MAJOR=16 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.5/alpine3.19/initdb-postgis.sh b/16-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 15-3.5/alpine3.19/initdb-postgis.sh rename to 16-3.5/bookworm/initdb-postgis.sh diff --git a/16-3.5/bookworm/tags b/16-3.5/bookworm/tags new file mode 100644 index 000000000..08919e7b3 --- /dev/null +++ b/16-3.5/bookworm/tags @@ -0,0 +1 @@ +16-3.5-bookworm 16-3.5.3-bookworm 16-3.5 diff --git a/15-3.5/alpine3.19/update-postgis.sh b/16-3.5/bookworm/update-postgis.sh similarity index 100% rename from 15-3.5/alpine3.19/update-postgis.sh rename to 16-3.5/bookworm/update-postgis.sh diff --git a/16-3.5/bullseye/Dockerfile b/16-3.5/bullseye/Dockerfile new file mode 100644 index 000000000..93c74d17a --- /dev/null +++ b/16-3.5/bullseye/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:16-bullseye +ARG PGIS1_POSTGRES_MAJOR=16 +ARG PGIS1_POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/15-3.5/alpine3.20/initdb-postgis.sh b/16-3.5/bullseye/initdb-postgis.sh similarity index 100% rename from 15-3.5/alpine3.20/initdb-postgis.sh rename to 16-3.5/bullseye/initdb-postgis.sh diff --git a/16-3.5/bullseye/tags b/16-3.5/bullseye/tags new file mode 100644 index 000000000..5a0e9d77e --- /dev/null +++ b/16-3.5/bullseye/tags @@ -0,0 +1 @@ +16-3.5-bullseye 16-3.5.2-bullseye diff --git a/15-3.5/alpine3.20/update-postgis.sh b/16-3.5/bullseye/update-postgis.sh similarity index 100% rename from 15-3.5/alpine3.20/update-postgis.sh rename to 16-3.5/bullseye/update-postgis.sh diff --git a/16-l3.5.0rc1/bookworm/tags b/16-l3.5.0rc1/bookworm/tags deleted file mode 100644 index 52f62487d..000000000 --- a/16-l3.5.0rc1/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -16-l3.5.0rc1-bookworm 16-l3.5.0rc1 diff --git a/16-master/bookworm/Dockerfile b/16-master/bookworm/Dockerfile index 57973a8b1..8eac66b78 100644 --- a/16-master/bookworm/Dockerfile +++ b/16-master/bookworm/Dockerfile @@ -1,6 +1,6 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! @@ -8,6 +8,10 @@ ARG PGIS1_BASE_IMAGE=postgres:16-bookworm +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + 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 @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ org.opencontainers.image.description="PostGIS - 16-master spatial database extension with PostgreSQL 16 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="16-master" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 16-master spatial database extension with PostgreSQL 16 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="16-master" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/16-recent/bookworm/Dockerfile b/16-recent/bookworm/Dockerfile index 57f9f9d38..f985b511a 100644 --- a/16-recent/bookworm/Dockerfile +++ b/16-recent/bookworm/Dockerfile @@ -1,6 +1,6 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! @@ -8,6 +8,10 @@ ARG PGIS1_BASE_IMAGE=postgres:16-bookworm +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + 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 @@ -16,21 +20,21 @@ ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/sfcgal/SFCGAL.git ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git # Should valid git checkout ( SHA1, tags, branches ) -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_GEOS_CHECKOUT=tags/3.13.0 -ARG PGIS1_GDAL_CHECKOUT=tags/v3.9.2 -ARG PGIS1_PROJ_CHECKOUT=tags/9.5.0 -ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.5.2 -ARG PGIS1_CGAL_CHECKOUT=tags/v5.6.1 +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_GEOS_CHECKOUT=tags/3.13.1 +ARG PGIS1_GDAL_CHECKOUT=tags/v3.11.1 +ARG PGIS1_PROJ_CHECKOUT=tags/9.6.2 +ARG PGIS1_SFCGAL_CHECKOUT=tags/v2.1.0 +ARG PGIS1_CGAL_CHECKOUT=tags/v6.0.1 # Skip SHA1 check if PGIS1_*_CHECKOUT_SHA1 is empty or 'nocheck' # Otherwise, verify that the commit hash matches -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf -ARG PGIS1_GEOS_CHECKOUT_SHA1=d7957246c588aa9c690efe67924fd70e741a06ab -ARG PGIS1_GDAL_CHECKOUT_SHA1=3aae5b4cf30c958ab339157b4f8115922e2f2562 -ARG PGIS1_PROJ_CHECKOUT_SHA1=0a407325fbb5bf42407a7dc5d4f948be9707e302 -ARG PGIS1_SFCGAL_CHECKOUT_SHA1=5584600ad7ed512f158b297476f57ed5fcf9c8dc -ARG PGIS1_CGAL_CHECKOUT_SHA1=188e51bad36ffc30e49dbabda29620b71a84664c +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 +ARG PGIS1_GEOS_CHECKOUT_SHA1=431568d6e311e0bbfb057b4ec3d44d0d3ba3335f +ARG PGIS1_GDAL_CHECKOUT_SHA1=226b7732b4672deaf35d6a16a39216047358f7d8 +ARG PGIS1_PROJ_CHECKOUT_SHA1=7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54 +ARG PGIS1_SFCGAL_CHECKOUT_SHA1=60573cfb6b3fc01eceda563d275a226317ba01db +ARG PGIS1_CGAL_CHECKOUT_SHA1=50cfbde3b84dbeae8338268db2d78fe4fcb522de ARG PGIS1_BOOST_VERSION=1.74.0 ARG PGIS1_CMAKE_BUILD_TYPE=Release @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ org.opencontainers.image.description="PostGIS - 16-recent spatial database extension with PostgreSQL 16 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="16-recent" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 16-recent spatial database extension with PostgreSQL 16 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="16-recent" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/16-recent/bookworm/tags b/16-recent/bookworm/tags index c868e5c2c..9d67d1c70 100644 --- a/16-recent/bookworm/tags +++ b/16-recent/bookworm/tags @@ -1 +1 @@ -16-recent-bookworm 16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 16-recent recent +16-recent-bookworm 16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 16-recent diff --git a/17-3.4/alpine3.21/Dockerfile b/17-3.4/alpine3.21/Dockerfile new file mode 100644 index 000000000..12603292a --- /dev/null +++ b/17-3.4/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:17-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-master/bookworm/initdb-postgis.sh b/17-3.4/alpine3.21/initdb-postgis.sh similarity index 100% rename from 15-master/bookworm/initdb-postgis.sh rename to 17-3.4/alpine3.21/initdb-postgis.sh diff --git a/17-3.4/alpine3.21/tags b/17-3.4/alpine3.21/tags new file mode 100644 index 000000000..646c3ccf4 --- /dev/null +++ b/17-3.4/alpine3.21/tags @@ -0,0 +1 @@ +17-3.4-alpine3.21 17-3.4.4-alpine3.21 diff --git a/15-master/bookworm/update-postgis.sh b/17-3.4/alpine3.21/update-postgis.sh similarity index 100% rename from 15-master/bookworm/update-postgis.sh rename to 17-3.4/alpine3.21/update-postgis.sh diff --git a/17-3.4/alpine3.22/Dockerfile b/17-3.4/alpine3.22/Dockerfile new file mode 100644 index 000000000..e155a8b32 --- /dev/null +++ b/17-3.4/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:17-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.4 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.4.4" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.4.4" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/15-recent/bookworm/initdb-postgis.sh b/17-3.4/alpine3.22/initdb-postgis.sh similarity index 100% rename from 15-recent/bookworm/initdb-postgis.sh rename to 17-3.4/alpine3.22/initdb-postgis.sh diff --git a/17-3.4/alpine3.22/tags b/17-3.4/alpine3.22/tags new file mode 100644 index 000000000..355da8042 --- /dev/null +++ b/17-3.4/alpine3.22/tags @@ -0,0 +1 @@ +17-3.4-alpine3.22 17-3.4.4-alpine3.22 17-3.4-alpine diff --git a/15-recent/bookworm/update-postgis.sh b/17-3.4/alpine3.22/update-postgis.sh similarity index 100% rename from 15-recent/bookworm/update-postgis.sh rename to 17-3.4/alpine3.22/update-postgis.sh diff --git a/15-3.4-bundle0/bookworm/Dockerfile b/17-3.5-bundle0/bookworm/Dockerfile similarity index 58% rename from 15-3.4-bundle0/bookworm/Dockerfile rename to 17-3.5-bundle0/bookworm/Dockerfile index adcdfa119..0e8f34704 100644 --- a/15-3.4-bundle0/bookworm/Dockerfile +++ b/17-3.5-bundle0/bookworm/Dockerfile @@ -1,10 +1,9 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.bundle0.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.bundle0.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. @@ -16,34 +15,27 @@ ARG REGISTRY=docker.io ARG REPO_NAME=imresamu ARG IMAGE_NAME=postgis-amd64 -ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm - -ARG PGIS1_MOBILITYDB_REPOSITORY=https://github.com/MobilityDB/MobilityDB.git -ARG PGIS1_MOBILITYDB_CHECKOUT=tags/v1.1.2 -ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1=6088e7bc10a31dee34fbc3e3139288a218e4ec65 - -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 PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:17-3.5-bookworm 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 PGIS1_TIMESCALEDB_APACHE_ONLY=false -ARG PGIS1_TIMESCALEDB_REPOSITORY=https://github.com/timescale/timescaledb.git -ARG PGIS1_TIMESCALEDB_CHECKOUT=tags/2.16.1 -ARG PGIS1_TIMESCALEDB_CHECKOUT_SHA1=7c78574c4d42ec7ceb840bd9d55652182221f251 - 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_2 -ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=fabd97bd76361051b91c0e772eb819a45f3fd095 +ARG PGIS1_PG_HINT_PLAN_CHECKOUT=tags/REL17_1_7_0 +ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1=85e07af6ca4675a26fa2281370c37371b883b2a9 + +ARG PGIS1_DUCKDB_CHECKOUT=tags/v1.3.1 -ARG PGIS1_DUCKDB_CHECKOUT=tags/v1.1.1 +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" FROM ${PGIS1_BASE_IMAGE} AS builder ARG PGIS1_DUCKDB_CHECKOUT +ARG PGIS1_OPTIMIZATION_FLAGS RUN set -eux \ && apt-get update \ @@ -55,6 +47,7 @@ RUN set -eux \ build-essential \ cmake \ curl \ + flex \ g++ \ git \ make \ @@ -62,36 +55,20 @@ RUN set -eux \ 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 \ - # hydra (columnar) - liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw sqlite3 \ - # plv8 - ninja-build \ - pkg-config \ # bytemagic libmagic-dev \ # pgsoudium \ libsodium-dev \ + # pg_curl + libcurl4-gnutls-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -FROM builder as builder-http-gzip - -ARG PGIS1_PGSQL_HTTP_REPOSITORY -ARG PGIS1_PGSQL_HTTP_CHECKOUT -ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-gzip ARG PGIS1_PGSQL_GZIP_REPOSITORY ARG PGIS1_PGSQL_GZIP_CHECKOUT @@ -110,79 +87,6 @@ RUN set -eux \ && make -j$(nproc) \ && make install -RUN set -eux \ - && mkdir -p /pgsql-http \ - && cd pgsql-http \ - && git init \ - && 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)" != "$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 -eux \ - && mkdir -p /timescaledb \ - && cd timescaledb \ - && git init \ - && 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)" != "$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=${PGIS1_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 - -FROM builder as builder-mobilitydb - -ARG PGIS1_MOBILITYDB_REPOSITORY -ARG PGIS1_MOBILITYDB_CHECKOUT -ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 - -# Install MobilityDB -RUN set -eux \ - && mkdir -p /MobilityDB \ - && cd MobilityDB \ - && git init \ - && 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)" != "$PGIS1_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 - FROM builder as builder-pgxn @@ -191,8 +95,6 @@ RUN pgxn install --verbose ddlx RUN pgxn install --verbose dsef RUN pgxn install --verbose json_accessors RUN pgxn install --verbose lostgis - -#RUN pgxn install --verbose parray_gin # not working on CircleCI arm .. yet RUN pgxn install --verbose permuteseq RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl RUN pgxn install --verbose pg_roaringbitmap @@ -202,7 +104,13 @@ RUN pgxn install --verbose pg_xenophile RUN pgxn install --verbose pg_xxhash RUN pgxn install --verbose pgsodium RUN pgxn install --verbose pgsql_tweaks -RUN USE_PGXS=1 pgxn install sqlite_fdw +# RUN pgxn install --verbose sqlite_fdw + +# pgxman pg_duckdb is not available / not working for PG17 yet + +#RUN pgxman install hydra_columnar +#RUN pgxman install pgvectorscale +#RUN pgxman install pg_quack FROM builder as builder-other @@ -210,25 +118,6 @@ ARG PGIS1_PG_HINT_PLAN_REPOSITORY ARG PGIS1_PG_HINT_PLAN_CHECKOUT ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 -# Add hydradatabase -# TODO hydradatabase version! -RUN set -eux \ - && git clone --depth 1 https://github.com/hydradatabase/hydra \ - && cd hydra/columnar \ - && git checkout main \ - && export COLUMNAR_O3=1 \ - && ./configure \ - && make -j$(nproc) \ - && make install - -# # # add pg_quack: PG 14 and PG 15 only (PG 16 is not yet supported) -# # TODO: add pg_quack version! -# RUN set -eux \ -# && git clone --depth 1 https://github.com/hydradatabase/pg_quack \ -# && cd pg_quack \ -# && make -j$(nproc) \ -# && make install -# # install pg_hint_plan RUN set -eux \ && mkdir pg_hint_plan \ @@ -253,11 +142,43 @@ RUN set -eux \ && rm -rf .git #install: psql < /pg_svg/pg-svg-lib.sql -FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:15-3.4-bookworm +FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:17-3.5-bookworm -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS Bundle - 15-3.4-bookworm " \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_TIMESCALEDB_TELEMETRY + +# Export build environment for child images (enterprise-grade package version locking) +RUN set -eux \ + # Ensure docker-postgis-env.sh exists (create empty if missing) + && touch /usr/local/share/docker-postgis-env.sh \ + # Export bundle-specific build versions for child images + && echo "# Bundle0 Extension Versions" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_OPTIMIZATION_FLAGS='${PGIS1_OPTIMIZATION_FLAGS}'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PG_HINT_PLAN_CHECKOUT='tags/REL17_1_7_0'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_DUCKDB_CHECKOUT='tags/v1.3.1'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PGSQL_GZIP_CHECKOUT='tags/v1.0.0'" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + # Source the environment after populating it + && . /usr/local/share/docker-postgis-env.sh + +# Only override opencontainers labels for bundle-specific info +# org.postgis.base.* labels are inherited from base image and should NOT be overridden +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS Bundle - 17-3.5-bookworm with MobilityDB, TimescaleDB, DuckDB and 40+ extensions" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3+dfsg-1~exp1.pgdg120+1-bundle0" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # Bundle-specific additional extensions (base PostGIS extensions inherited from org.postgis.base.extensions) + org.postgis.bundle0.additional.extensions="timescaledb,mobilitydb,pgsql_http,pgsql_gzip,pgrouting,pgvector,h3,pointcloud,pgaudit,byteamagic,ddlx,dsef,json_accessors,lostgis,permuteseq,pg_curl,pg_roaringbitmap,pg_rowalesce,pg_uuidv7,pg_xenophile,pg_xxhash,pgsodium,pgsql_tweaks,asn1oid,extra_window_functions,first_last_agg,hll,hypopg,icu_ext,jsquery,numeral,ogr_fdw,partman,periods,pg_fact_loader,pg_failover_slots,pg_stat_kcache,pg_wait_sampling,pgl_ddl_deploy,pglogical,pgmp,pgpcre,pgq3,pgsphere,pgtap,pldebugger,plpgsql_check,prefix,prioritize,q3c,repack,rum,show_plans,squeeze" \ + org.postgis.bundle0.excluded.pg17="sqlite_fdw,age,decoderbufs" \ + org.postgis.bundle0.permanently.excluded="parray_gin,pg_quack" \ + org.postgis.bundle0.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.bundle0.timescaledb.telemetry="${PGIS1_TIMESCALEDB_TELEMETRY}" \ + org.postgis.bundle0.duckdb.version="tags/v1.3.1" # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization @@ -306,17 +227,24 @@ RUN set -eux \ pspg \ vip-manager \ \ + # add any exceptions for PG17 or PPG16 here + # PostgreSQL 17 specific packages + \ postgresql-$PG_MAJOR-age \ postgresql-$PG_MAJOR-asn1oid \ + postgresql-$PG_MAJOR-auto-failover \ + postgresql-$PG_MAJOR-credcheck \ postgresql-$PG_MAJOR-cron \ postgresql-$PG_MAJOR-decoderbufs \ postgresql-$PG_MAJOR-extra-window-functions \ postgresql-$PG_MAJOR-first-last-agg \ postgresql-$PG_MAJOR-h3 \ postgresql-$PG_MAJOR-hll \ + postgresql-$PG_MAJOR-http \ postgresql-$PG_MAJOR-hypopg \ postgresql-$PG_MAJOR-icu-ext \ postgresql-$PG_MAJOR-jsquery \ + postgresql-$PG_MAJOR-mobilitydb \ postgresql-$PG_MAJOR-numeral \ postgresql-$PG_MAJOR-ogr-fdw \ postgresql-$PG_MAJOR-partman \ @@ -346,8 +274,7 @@ RUN set -eux \ postgresql-$PG_MAJOR-rum \ postgresql-$PG_MAJOR-show-plans \ postgresql-$PG_MAJOR-squeeze \ - # add MobilityDb missing dependency from libgsl-dev - libgsl27 \ + postgresql-$PG_MAJOR-timescaledb \ # MeCab based tokenizer for pgdg-pgroonga groonga-tokenizer-mecab \ # bytemagic @@ -362,40 +289,42 @@ RUN set -eux \ ARG PGIS1_DUCKDB_CHECKOUT ENV PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT} RUN arch=$(uname -m) \ - && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed 's/tags\///') \ + && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed -E 's|^.*/||; s|^tags/||; s|^v||') \ && echo "DUCKDB_VERSION=${DUCKDB_VERSION}" \ && echo "PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT}" \ && case "$arch" in \ x86_64) \ duck_binary="duckdb_cli-linux-amd64.zip" ;; \ aarch64) \ - duck_binary="duckdb_cli-linux-aarch64.zip" ;; \ + duck_binary="duckdb_cli-linux-arm64.zip" ;; \ *) \ echo "Unsupported architecture: $arch"; exit 1 ;; \ esac \ - && wget https://github.com/duckdb/duckdb/releases/download/${DUCKDB_VERSION}/$duck_binary \ + && wget https://github.com/duckdb/duckdb/releases/download/v${DUCKDB_VERSION}/$duck_binary \ && unzip $duck_binary -d /usr/local/bin \ && rm $duck_binary \ && duckdb --version -# install extensions -# https://duckdb.org/docs/extensions/overview.html -ENV DUCKDB_EXTENSIONS="arrow autocomplete excel fts httpfs icu inet json parquet postgres_scanner spatial sqlite_scanner substrait tpcds tpch visualizer" +# install duckdb extensions +ENV DUCKDB_EXTENSIONS="excel fts httpfs inet postgres_scanner spatial sqlite_scanner tpcds tpch" RUN for e in ${DUCKDB_EXTENSIONS} ; do \ echo "Installing $e ..."; \ - duckdb -c "INSTALL $e;"; \ - echo "LOAD $e;" >> $HOME/.duckdbrc; \ - done + if duckdb -c "INSTALL $e;" 2>&1 | tee /tmp/duckdb-install-$e.log; then \ + echo "Successfully installed $e"; \ + echo "LOAD $e;" >> $HOME/.duckdbrc; \ + else \ + echo "Failed to install $e, check /tmp/duckdb-install-$e.log"; \ + fi; \ + done \ + # Add core extensions to .duckdbrc (these are built-in) + && echo "LOAD autocomplete;" >> $HOME/.duckdbrc \ + && echo "LOAD icu;" >> $HOME/.duckdbrc \ + && echo "LOAD json;" >> $HOME/.duckdbrc \ + && echo "LOAD parquet;" >> $HOME/.duckdbrc # 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-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-gzip /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 @@ -424,7 +353,7 @@ RUN set -eux \ 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 = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'postgis-3,pg_stat_statements,timescaledb'" >> /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/initdb-bundle0.sh b/17-3.5-bundle0/bookworm/initdb-bundle0.sh similarity index 100% rename from 16-3.4-bundle0/bookworm/initdb-bundle0.sh rename to 17-3.5-bundle0/bookworm/initdb-bundle0.sh diff --git a/17-3.5-bundle0/bookworm/tags b/17-3.5-bundle0/bookworm/tags new file mode 100644 index 000000000..92ce01056 --- /dev/null +++ b/17-3.5-bundle0/bookworm/tags @@ -0,0 +1 @@ +17-3.5-bundle0-bookworm 17-3.5.3-bundle0-bookworm 17-3.5-bundle0 bundle0 diff --git a/17-3.5/alpine3.21/Dockerfile b/17-3.5/alpine3.21/Dockerfile new file mode 100644 index 000000000..10f61bfc4 --- /dev/null +++ b/17-3.5/alpine3.21/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:17-alpine3.21 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.21" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.21" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/16-3.3/alpine3.20/initdb-postgis.sh b/17-3.5/alpine3.21/initdb-postgis.sh similarity index 100% rename from 16-3.3/alpine3.20/initdb-postgis.sh rename to 17-3.5/alpine3.21/initdb-postgis.sh diff --git a/17-3.5/alpine3.21/tags b/17-3.5/alpine3.21/tags new file mode 100644 index 000000000..f1667dd61 --- /dev/null +++ b/17-3.5/alpine3.21/tags @@ -0,0 +1 @@ +17-3.5-alpine3.21 17-3.5.3-alpine3.21 diff --git a/16-3.3/alpine3.20/update-postgis.sh b/17-3.5/alpine3.21/update-postgis.sh similarity index 100% rename from 16-3.3/alpine3.20/update-postgis.sh rename to 17-3.5/alpine3.21/update-postgis.sh diff --git a/17-3.5/alpine3.22/Dockerfile b/17-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..85c5c75e0 --- /dev/null +++ b/17-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:17-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/16-3.4/alpine3.19/initdb-postgis.sh b/17-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 16-3.4/alpine3.19/initdb-postgis.sh rename to 17-3.5/alpine3.22/initdb-postgis.sh diff --git a/17-3.5/alpine3.22/tags b/17-3.5/alpine3.22/tags new file mode 100644 index 000000000..73ede3e95 --- /dev/null +++ b/17-3.5/alpine3.22/tags @@ -0,0 +1 @@ +17-3.5-alpine3.22 17-3.5.3-alpine3.22 17-3.5-alpine alpine diff --git a/16-3.4/alpine3.19/update-postgis.sh b/17-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 16-3.4/alpine3.19/update-postgis.sh rename to 17-3.5/alpine3.22/update-postgis.sh diff --git a/17-3.5/bookworm/Dockerfile b/17-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..b3e5b6d85 --- /dev/null +++ b/17-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:17-bookworm +ARG PGIS1_POSTGRES_MAJOR=17 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/alpine3.20/initdb-postgis.sh b/17-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 16-3.4/alpine3.20/initdb-postgis.sh rename to 17-3.5/bookworm/initdb-postgis.sh diff --git a/17-3.5/bookworm/tags b/17-3.5/bookworm/tags new file mode 100644 index 000000000..f147f4a94 --- /dev/null +++ b/17-3.5/bookworm/tags @@ -0,0 +1 @@ +17-3.5-bookworm 17-3.5.3-bookworm 17-3.5 latest diff --git a/16-3.4/alpine3.20/update-postgis.sh b/17-3.5/bookworm/update-postgis.sh similarity index 100% rename from 16-3.4/alpine3.20/update-postgis.sh rename to 17-3.5/bookworm/update-postgis.sh diff --git a/17-3.5/bullseye/Dockerfile b/17-3.5/bullseye/Dockerfile new file mode 100644 index 000000000..e5dda44da --- /dev/null +++ b/17-3.5/bullseye/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:17-bullseye +ARG PGIS1_POSTGRES_MAJOR=17 +ARG PGIS1_POSTGIS_VERSION=3.5.2+dfsg-1.pgdg110+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bullseye" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/16-3.4/bookworm/initdb-postgis.sh b/17-3.5/bullseye/initdb-postgis.sh similarity index 100% rename from 16-3.4/bookworm/initdb-postgis.sh rename to 17-3.5/bullseye/initdb-postgis.sh diff --git a/17-3.5/bullseye/tags b/17-3.5/bullseye/tags new file mode 100644 index 000000000..2e5ab6fb3 --- /dev/null +++ b/17-3.5/bullseye/tags @@ -0,0 +1 @@ +17-3.5-bullseye 17-3.5.2-bullseye diff --git a/16-3.4/bookworm/update-postgis.sh b/17-3.5/bullseye/update-postgis.sh similarity index 100% rename from 16-3.4/bookworm/update-postgis.sh rename to 17-3.5/bullseye/update-postgis.sh diff --git a/17-3.6/alpine3.22/Dockerfile b/17-3.6/alpine3.22/Dockerfile new file mode 100644 index 000000000..03e6ec1dc --- /dev/null +++ b/17-3.6/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:17-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.6.0alpha1 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=b32829d707ef65515df1224361b9f2d5889db348 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.6.0alpha1" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.6.0alpha1" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/16-3.4/bullseye/initdb-postgis.sh b/17-3.6/alpine3.22/initdb-postgis.sh similarity index 100% rename from 16-3.4/bullseye/initdb-postgis.sh rename to 17-3.6/alpine3.22/initdb-postgis.sh diff --git a/17-3.6/alpine3.22/tags b/17-3.6/alpine3.22/tags new file mode 100644 index 000000000..e98f9f8ce --- /dev/null +++ b/17-3.6/alpine3.22/tags @@ -0,0 +1 @@ +17-3.6.0alpha1-alpine3.22 17-3.6.0alpha1-alpine diff --git a/16-3.4/bullseye/update-postgis.sh b/17-3.6/alpine3.22/update-postgis.sh similarity index 100% rename from 16-3.4/bullseye/update-postgis.sh rename to 17-3.6/alpine3.22/update-postgis.sh diff --git a/17rc1-master/bookworm/Dockerfile b/17-master/bookworm/Dockerfile similarity index 86% rename from 17rc1-master/bookworm/Dockerfile rename to 17-master/bookworm/Dockerfile index 528818137..874955641 100644 --- a/17rc1-master/bookworm/Dockerfile +++ b/17-master/bookworm/Dockerfile @@ -1,12 +1,16 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS1_BASE_IMAGE=postgres:17rc1-bookworm +ARG PGIS1_BASE_IMAGE=postgres:17-bookworm + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 17rc1-master spatial database extension with PostgreSQL 17rc1 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS - 17-master spatial database extension with PostgreSQL 17 bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="17-master" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 17-master spatial database extension with PostgreSQL 17 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="17-master" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/16-3.5/alpine3.19/initdb-postgis.sh b/17-master/bookworm/initdb-postgis.sh similarity index 100% rename from 16-3.5/alpine3.19/initdb-postgis.sh rename to 17-master/bookworm/initdb-postgis.sh diff --git a/17-master/bookworm/tags b/17-master/bookworm/tags new file mode 100644 index 000000000..1358267c6 --- /dev/null +++ b/17-master/bookworm/tags @@ -0,0 +1 @@ +17-master-bookworm 17-master diff --git a/16-3.5/alpine3.19/update-postgis.sh b/17-master/bookworm/update-postgis.sh similarity index 100% rename from 16-3.5/alpine3.19/update-postgis.sh rename to 17-master/bookworm/update-postgis.sh diff --git a/16-l3.5.0rc1/bookworm/Dockerfile b/17-recent/bookworm/Dockerfile similarity index 84% rename from 16-l3.5.0rc1/bookworm/Dockerfile rename to 17-recent/bookworm/Dockerfile index cf149a3db..7b71e7da7 100644 --- a/16-l3.5.0rc1/bookworm/Dockerfile +++ b/17-recent/bookworm/Dockerfile @@ -1,12 +1,16 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS1_BASE_IMAGE=postgres:16-bookworm +ARG PGIS1_BASE_IMAGE=postgres:17-bookworm + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git @@ -16,21 +20,21 @@ ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/sfcgal/SFCGAL.git ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git # Should valid git checkout ( SHA1, tags, branches ) -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_GEOS_CHECKOUT=tags/3.13.0 -ARG PGIS1_GDAL_CHECKOUT=tags/v3.9.2 -ARG PGIS1_PROJ_CHECKOUT=tags/9.5.0 -ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.5.2 -ARG PGIS1_CGAL_CHECKOUT=tags/v5.6.1 +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_GEOS_CHECKOUT=tags/3.13.1 +ARG PGIS1_GDAL_CHECKOUT=tags/v3.11.1 +ARG PGIS1_PROJ_CHECKOUT=tags/9.6.2 +ARG PGIS1_SFCGAL_CHECKOUT=tags/v2.1.0 +ARG PGIS1_CGAL_CHECKOUT=tags/v6.0.1 # Skip SHA1 check if PGIS1_*_CHECKOUT_SHA1 is empty or 'nocheck' # Otherwise, verify that the commit hash matches -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 -ARG PGIS1_GEOS_CHECKOUT_SHA1=d7957246c588aa9c690efe67924fd70e741a06ab -ARG PGIS1_GDAL_CHECKOUT_SHA1=3aae5b4cf30c958ab339157b4f8115922e2f2562 -ARG PGIS1_PROJ_CHECKOUT_SHA1=0a407325fbb5bf42407a7dc5d4f948be9707e302 -ARG PGIS1_SFCGAL_CHECKOUT_SHA1=5584600ad7ed512f158b297476f57ed5fcf9c8dc -ARG PGIS1_CGAL_CHECKOUT_SHA1=188e51bad36ffc30e49dbabda29620b71a84664c +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 +ARG PGIS1_GEOS_CHECKOUT_SHA1=431568d6e311e0bbfb057b4ec3d44d0d3ba3335f +ARG PGIS1_GDAL_CHECKOUT_SHA1=226b7732b4672deaf35d6a16a39216047358f7d8 +ARG PGIS1_PROJ_CHECKOUT_SHA1=7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54 +ARG PGIS1_SFCGAL_CHECKOUT_SHA1=60573cfb6b3fc01eceda563d275a226317ba01db +ARG PGIS1_CGAL_CHECKOUT_SHA1=50cfbde3b84dbeae8338268db2d78fe4fcb522de ARG PGIS1_BOOST_VERSION=1.74.0 ARG PGIS1_CMAKE_BUILD_TYPE=Release @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 16-l3.5.0rc1 spatial database extension with PostgreSQL 16 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS - 17-recent spatial database extension with PostgreSQL 17 bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="17-recent" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 17-recent spatial database extension with PostgreSQL 17 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="17-recent" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/16-3.5/alpine3.20/initdb-postgis.sh b/17-recent/bookworm/initdb-postgis.sh similarity index 100% rename from 16-3.5/alpine3.20/initdb-postgis.sh rename to 17-recent/bookworm/initdb-postgis.sh diff --git a/17-recent/bookworm/tags b/17-recent/bookworm/tags new file mode 100644 index 000000000..895b1abe9 --- /dev/null +++ b/17-recent/bookworm/tags @@ -0,0 +1 @@ +17-recent-bookworm 17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 17-recent recent diff --git a/16-3.5/alpine3.20/update-postgis.sh b/17-recent/bookworm/update-postgis.sh similarity index 100% rename from 16-3.5/alpine3.20/update-postgis.sh rename to 17-recent/bookworm/update-postgis.sh diff --git a/17rc1-3.4/alpine3.20/Dockerfile b/17rc1-3.4/alpine3.20/Dockerfile deleted file mode 100644 index 8de6b5bf6..000000000 --- a/17rc1-3.4/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:17rc1-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17rc1 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/17rc1-3.4/alpine3.20/tags b/17rc1-3.4/alpine3.20/tags deleted file mode 100644 index edbc4a9d8..000000000 --- a/17rc1-3.4/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-3.4-alpine3.20 17rc1-3.4.3-alpine3.20 17rc1-3.4-alpine diff --git a/17rc1-3.5/alpine3.19/Dockerfile b/17rc1-3.5/alpine3.19/Dockerfile deleted file mode 100644 index e2109cc2b..000000000 --- a/17rc1-3.5/alpine3.19/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:17rc1-alpine3.19 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17rc1 alpine3.19" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/17rc1-3.5/alpine3.19/tags b/17rc1-3.5/alpine3.19/tags deleted file mode 100644 index 8a24298ac..000000000 --- a/17rc1-3.5/alpine3.19/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-3.5.0rc1-alpine3.19 diff --git a/17rc1-3.5/alpine3.20/Dockerfile b/17rc1-3.5/alpine3.20/Dockerfile deleted file mode 100644 index 6c759cd3d..000000000 --- a/17rc1-3.5/alpine3.20/Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.alpine.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -ARG PGIS1_BASE_IMAGE=postgres:17rc1-alpine3.20 -ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 - -FROM ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 17rc1 alpine3.20" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/17rc1-3.5/alpine3.20/tags b/17rc1-3.5/alpine3.20/tags deleted file mode 100644 index 9358e8766..000000000 --- a/17rc1-3.5/alpine3.20/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-3.5.0rc1-alpine3.20 17rc1-3.5.0rc1-alpine diff --git a/17rc1-l3.5.0rc1/bookworm/Dockerfile b/17rc1-l3.5.0rc1/bookworm/Dockerfile deleted file mode 100644 index d5773b1a1..000000000 --- a/17rc1-l3.5.0rc1/bookworm/Dockerfile +++ /dev/null @@ -1,730 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -# "Experimental"; solely for testing purposes. Anticipate frequent changes! -# This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. - -ARG PGIS1_BASE_IMAGE=postgres:17rc1-bookworm - -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/sfcgal/SFCGAL.git -ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git - -# Should valid git checkout ( SHA1, tags, branches ) -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.0rc1 -ARG PGIS1_GEOS_CHECKOUT=tags/3.13.0 -ARG PGIS1_GDAL_CHECKOUT=tags/v3.9.2 -ARG PGIS1_PROJ_CHECKOUT=tags/9.5.0 -ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.5.2 -ARG PGIS1_CGAL_CHECKOUT=tags/v5.6.1 - -# Skip SHA1 check if PGIS1_*_CHECKOUT_SHA1 is empty or 'nocheck' -# Otherwise, verify that the commit hash matches -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=df9317741170e86ff8346decdd555b54a0432072 -ARG PGIS1_GEOS_CHECKOUT_SHA1=d7957246c588aa9c690efe67924fd70e741a06ab -ARG PGIS1_GDAL_CHECKOUT_SHA1=3aae5b4cf30c958ab339157b4f8115922e2f2562 -ARG PGIS1_PROJ_CHECKOUT_SHA1=0a407325fbb5bf42407a7dc5d4f948be9707e302 -ARG PGIS1_SFCGAL_CHECKOUT_SHA1=5584600ad7ed512f158b297476f57ed5fcf9c8dc -ARG PGIS1_CGAL_CHECKOUT_SHA1=188e51bad36ffc30e49dbabda29620b71a84664c - -ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS1_CMAKE_BUILD_TYPE=Release - -ARG PGIS1_GDAL_BUILD=with_extra -# Full GDAL build ; with arrow, parquet and extra dependencies - -FROM ${PGIS1_BASE_IMAGE} as builder - -WORKDIR / - -ARG PGIS1_BOOST_VERSION -ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} - -# apt-get install -RUN set -eux \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - curl \ - 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 \ - libgmpxx4ldbl \ - libjson-c5 \ - libmpfr6 \ - libprotobuf-c1 \ - libtiff6 \ - libxml2 \ - sqlite3 \ - # build dependency - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - ca-certificates \ - cmake \ - g++ \ - git \ - libboost-all-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libpq-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - make \ - pkg-config \ - protobuf-c-compiler \ - xsltproc \ - # gdal+ - liblz4-dev \ - liblzma-dev \ - libwebp-dev \ - libzstd-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -ARG PGIS1_CMAKE_BUILD_TYPE -ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} - -FROM builder as cgal-sfcgal-builder - -# cgal & sfcgal -ARG PGIS1_SFCGAL_REPOSITORY -ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} -ARG PGIS1_SFCGAL_CHECKOUT -ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS1_SFCGAL_CHECKOUT_SHA1 - -ARG PGIS1_CGAL_REPOSITORY -ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} -ARG PGIS1_CGAL_CHECKOUT -ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} -ARG PGIS1_CGAL_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir cgal \ - && cd cgal \ - && git init \ - && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_CGAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_CGAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_CGAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_CGAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping CGAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_CGAL_CHECKOUT_SHA1}" ]; then \ - echo "CGAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_cgal_last_commit.txt \ - && cd /usr/src \ - && mkdir SFCGAL \ - && cd SFCGAL \ - && git init \ - && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_SFCGAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_SFCGAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_SFCGAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_SFCGAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping SFCGAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_SFCGAL_CHECKOUT_SHA1}" ]; then \ - echo "SFCGAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_sfcgal_last_commit.txt \ - && mkdir cmake-build \ - && cd cmake-build \ - && cmake .. \ - -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ - -DSFCGAL_BUILD_BENCH=OFF \ - -DSFCGAL_BUILD_EXAMPLES=OFF \ - -DSFCGAL_BUILD_TESTS=OFF \ - -DSFCGAL_WITH_OSG=OFF \ - && make -j$(nproc) \ - && make install \ - # clean - && rm -fr /usr/src/SFCGAL \ - && rm -fr /usr/src/cgal - - -FROM builder as proj-builder - -# proj -ARG PGIS1_PROJ_REPOSITORY -ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} -ARG PGIS1_PROJ_CHECKOUT -ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} -ARG PGIS1_PROJ_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir PROJ \ - && cd PROJ \ - && git init \ - && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_PROJ_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_PROJ_CHECKOUT_SHA1 - && if [ -z "${PGIS1_PROJ_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_PROJ_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping PROJ SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_PROJ_CHECKOUT_SHA1}" ]; then \ - echo "PROJ SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_proj_last_commit.txt \ - # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 - && if [ -f "autogen.sh" ] ; then \ - set -eux \ - && echo "autotools version: 'autogen.sh' exists! Older version!" \ - && ./autogen.sh \ - && ./configure --disable-static \ - && make -j$(nproc) \ - && make install \ - ; \ - else \ - set -eux \ - && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ - && mkdir build \ - && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ - && make -j$(nproc) \ - && make install \ - ; \ - fi \ - \ - && rm -fr /usr/src/PROJ - - -FROM builder as geos-builder - -# geos -ARG PGIS1_GEOS_REPOSITORY -ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} -ARG PGIS1_GEOS_CHECKOUT -ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} -ARG PGIS1_GEOS_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir geos \ - && cd geos \ - && git init \ - && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_GEOS_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_GEOS_CHECKOUT_SHA1 - && if [ -z "${PGIS1_GEOS_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_GEOS_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping GEOS SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_GEOS_CHECKOUT_SHA1}" ]; then \ - echo "GEOS SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_geos_last_commit.txt \ - && mkdir cmake-build \ - && cd cmake-build \ - && 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 PGIS1_GDAL_REPOSITORY -ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} -ARG PGIS1_GDAL_CHECKOUT -ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} -ARG PGIS1_GDAL_CHECKOUT_SHA1 - - - -# Install Arrow C++ -# also check the "Build final image" section too, for the final installation -RUN set -eux \ - # add backports \ - && apt-get update \ - && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get update \ - # Automatically determine the latest PGIS1 Arrow version and SOVERSION - && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ - && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ - && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ - && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ - && echo "Detected PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" \ - # Backup the version variables - reusing in a later stage - && echo "PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" > /_pgis1_arrow_environment.env \ - && echo "PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" >> /_pgis1_arrow_environment.env \ - # Install Arrow C++ - && apt-get install -y --no-install-recommends \ - libarrow${PGIS1_ARROW_SOVERSION} \ - libparquet${PGIS1_ARROW_SOVERSION} \ - libarrow-dataset${PGIS1_ARROW_SOVERSION} \ - libarrow-dev=${PGIS1_ARROW_VERSION} \ - libparquet-dev=${PGIS1_ARROW_VERSION} \ - libarrow-acero-dev=${PGIS1_ARROW_VERSION} \ - libarrow-dataset-dev=${PGIS1_ARROW_VERSION} \ - \ - libblosc-dev \ - libcfitsio-dev \ - libfreexl-dev \ - libfyba-dev \ - libhdf5-dev \ - libheif-dev \ - libkml-dev \ - libnetcdf-dev \ - libopenjp2-7-dev \ - libpng-dev \ - libqhull-dev \ - libspatialite-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -## GDAL_build-end - -RUN set -eux \ - && ldconfig \ - && cd /usr/src \ - && mkdir gdal \ - && cd gdal \ - && git init \ - && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_GDAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_GDAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_GDAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_GDAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping GDAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_GDAL_CHECKOUT_SHA1}" ]; then \ - echo "GDAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_gdal_last_commit.txt \ - \ - # gdal project directory structure - has been changed ! - && if [ -d "gdal" ] ; then \ - echo "Directory 'gdal' dir exists -> older version!" ; \ - cd gdal ; \ - else \ - echo "Directory 'gdal' does not exists! Newer version! " ; \ - fi \ - \ - && if [ -f "./autogen.sh" ]; then \ - # Building with autoconf ( old/deprecated ) - set -eux \ - && ./autogen.sh \ - && ./configure --disable-static \ - ; \ - else \ - # Building with cmake - set -eux \ - && mkdir build \ - && cd build \ - # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. \ - -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ - -DBUILD_TESTING=OFF \ - -DBUILD_DOCS=OFF \ - \ - -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ - -DRENAME_INTERNAL_TIFF_SYMBOLS=ON \ - -DGDAL_USE_CURL=ON \ - -DGDAL_USE_DEFLATE=ON \ - -DGDAL_USE_EXPAT=ON \ - -DGDAL_USE_GEOS=ON \ - -DGDAL_USE_JSONC=ON \ - -DGDAL_USE_LIBLZMA=ON \ - -DGDAL_USE_LIBXML2=ON \ - -DGDAL_USE_LZ4=ON \ - -DGDAL_USE_POSTGRESQL=ON \ - -DGDAL_USE_SQLITE3=ON \ - -DGDAL_USE_TIFF=ON \ - -DGDAL_USE_WEBP=ON \ - -DGDAL_USE_ZLIB=ON \ - -DGDAL_USE_ZSTD=ON \ - \ - -DGDAL_USE_ARROW=ON \ - -DGDAL_USE_ARROWDATASET=ON \ - -DGDAL_USE_BLOSC=ON \ - -DGDAL_USE_CFITSIO=ON \ - -DGDAL_USE_FREEXL=ON \ - -DGDAL_USE_FYBA=ON \ - -DGDAL_USE_HDF5=ON \ - -DGDAL_USE_HEIF=ON \ - -DGDAL_USE_LERC_INTERNAL=ON \ - -DGDAL_USE_LIBKML=ON \ - -DGDAL_USE_NETCDF=ON \ - -DGDAL_USE_OPENJPEG=ON \ - -DGDAL_USE_PARQUET=ON \ - -DGDAL_USE_PNG=ON \ - -DGDAL_USE_QHULL=ON \ - -DGDAL_USE_SPATIALITE=ON \ - ; \ - fi \ - \ - && make -j$(nproc) \ - && make install \ - && cd / \ - && rm -fr /usr/src/gdal - -# Minimal command line test. -RUN set -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - && pcre-config --version - -# ------------------------------------------- -# final stage -# ------------------------------------------- -FROM ${PGIS1_BASE_IMAGE} - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 17rc1-l3.5.0rc1 spatial database extension with PostgreSQL 17rc1 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ARG PGIS1_CMAKE_BUILD_TYPE -ARG PGIS1_BASE_IMAGE -ARG PGIS1_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 -eux \ - && apt-get update \ - && apt-get install -y -V --no-install-recommends \ - \ - curl \ - 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 \ - libgmpxx4ldbl \ - libjson-c5 \ - libmpfr6 \ - libpcre3 \ - libprotobuf-c1 \ - libtiff6 \ - libxml2 \ - sqlite3 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=stage0-builder /_pgis*.* / -COPY --from=stage0-builder /usr/local /usr/local - -# Install Arrow + Parquet + other GDAL extra dependencies - -RUN set -eux \ - # Install Arrow + Parquet - && apt-get update \ - && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get update \ - # Load the PGIS1_ARROW version variables - && . /_pgis1_arrow_environment.env \ - # Use the PGIS1_ARROW_SOVERSION as needed - && echo "Using PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" \ - && apt-get install -y -V --no-install-recommends \ - libarrow${PGIS1_ARROW_SOVERSION} \ - libparquet${PGIS1_ARROW_SOVERSION} \ - libarrow-dataset${PGIS1_ARROW_SOVERSION} \ - \ - # Install GDAL extra dependencies - libblosc1 \ - libcrypto++8 \ - libfreexl1 \ - libfyba0 \ - libhdf5-103-1 \ - libheif1 \ - libkmlbase1 \ - libkmldom1 \ - libkmlengine1 \ - libnetcdf19 \ - libopenjp2-7 \ - libpng16-16 \ - libqhull-r8.0 \ - librasterlite2-1 \ - libspatialite7 \ - netcdf-bin \ - libcfitsio10 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -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 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1 - -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 -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && gdal-config --formats \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - \ - # Testing ogr2ogr PostgreSQL driver. - && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ - || echo "ogr2ogr missing PostgreSQL driver" && exit 1 - -# Specify GDAL_CONFIG and LD_LIBRARY_PATH for PostGIS build; -# The arm64 build is very senitive. -ENV GDAL_CONFIG /usr/local/bin/gdal-config -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - -# 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 -eux \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - ca-certificates \ - cmake \ - docbook-xml \ - docbook5-xml \ - g++ \ - git \ - libboost-all-dev \ - libcunit1-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - pkg-config \ - postgresql-server-dev-$PG_MAJOR \ - protobuf-c-compiler \ - xsltproc \ - && cd \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_POSTGIS_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_POSTGIS_CHECKOUT_SHA1 - && if [ -z "${PGIS1_POSTGIS_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_POSTGIS_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping POSTGIS SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_POSTGIS_CHECKOUT_SHA1}" ]; then \ - echo "POSTGIS SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_last_commit.txt \ - && ldconfig \ - && ./autogen.sh \ -# configure options taken from: -# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ -# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316 - && if command -v projsync >/dev/null 2>&1; then \ - projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn ; \ - fi \ -# regress check - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && ldconfig \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# clean - && cd / \ - && rm -rf /usr/src/postgis \ - && apt-get purge -y --autoremove \ - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - cmake \ - docbook-xml \ - docbook5-xml \ - g++ \ - git \ - libboost-all-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - pkg-config \ - postgresql-server-dev-$PG_MAJOR \ - protobuf-c-compiler \ - xsltproc \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin - -# last final test -RUN set -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && gdal-config --formats \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - # check any missing dependencies - && ldd /usr/lib/postgresql/$PG_MAJOR/lib/*.so | grep 'not found' && exit 1 || true \ - \ - # Is the "ca-certificates" package installed? (for accessing remote raster files) - # https://github.com/postgis/docker-postgis/issues/307 - && dpkg-query -W -f='${Status}' ca-certificates 2>/dev/null | grep -c "ok installed" \ - \ - # list last commits. - && find /_pgis*_commit.txt -type f -print -exec cat {} \; \ - # list postgresql, postgis version - && cat _pgis_full_version.txt diff --git a/17rc1-l3.5.0rc1/bookworm/tags b/17rc1-l3.5.0rc1/bookworm/tags deleted file mode 100644 index fb889c36b..000000000 --- a/17rc1-l3.5.0rc1/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-l3.5.0rc1-bookworm 17rc1-l3.5.0rc1 diff --git a/17rc1-master/bookworm/tags b/17rc1-master/bookworm/tags deleted file mode 100644 index ff1490101..000000000 --- a/17rc1-master/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-master-bookworm 17rc1-master diff --git a/17rc1-recent/bookworm/Dockerfile b/17rc1-recent/bookworm/Dockerfile deleted file mode 100644 index 060b6443b..000000000 --- a/17rc1-recent/bookworm/Dockerfile +++ /dev/null @@ -1,730 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" -# PLEASE DO NOT EDIT IT DIRECTLY. -# -# "Experimental"; solely for testing purposes. Anticipate frequent changes! -# This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. - -ARG PGIS1_BASE_IMAGE=postgres:17rc1-bookworm - -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/sfcgal/SFCGAL.git -ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git - -# Should valid git checkout ( SHA1, tags, branches ) -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_GEOS_CHECKOUT=tags/3.13.0 -ARG PGIS1_GDAL_CHECKOUT=tags/v3.9.2 -ARG PGIS1_PROJ_CHECKOUT=tags/9.5.0 -ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.5.2 -ARG PGIS1_CGAL_CHECKOUT=tags/v5.6.1 - -# Skip SHA1 check if PGIS1_*_CHECKOUT_SHA1 is empty or 'nocheck' -# Otherwise, verify that the commit hash matches -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf -ARG PGIS1_GEOS_CHECKOUT_SHA1=d7957246c588aa9c690efe67924fd70e741a06ab -ARG PGIS1_GDAL_CHECKOUT_SHA1=3aae5b4cf30c958ab339157b4f8115922e2f2562 -ARG PGIS1_PROJ_CHECKOUT_SHA1=0a407325fbb5bf42407a7dc5d4f948be9707e302 -ARG PGIS1_SFCGAL_CHECKOUT_SHA1=5584600ad7ed512f158b297476f57ed5fcf9c8dc -ARG PGIS1_CGAL_CHECKOUT_SHA1=188e51bad36ffc30e49dbabda29620b71a84664c - -ARG PGIS1_BOOST_VERSION=1.74.0 -ARG PGIS1_CMAKE_BUILD_TYPE=Release - -ARG PGIS1_GDAL_BUILD=with_extra -# Full GDAL build ; with arrow, parquet and extra dependencies - -FROM ${PGIS1_BASE_IMAGE} as builder - -WORKDIR / - -ARG PGIS1_BOOST_VERSION -ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} - -# apt-get install -RUN set -eux \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - curl \ - 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 \ - libgmpxx4ldbl \ - libjson-c5 \ - libmpfr6 \ - libprotobuf-c1 \ - libtiff6 \ - libxml2 \ - sqlite3 \ - # build dependency - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - ca-certificates \ - cmake \ - g++ \ - git \ - libboost-all-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libpq-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - make \ - pkg-config \ - protobuf-c-compiler \ - xsltproc \ - # gdal+ - liblz4-dev \ - liblzma-dev \ - libwebp-dev \ - libzstd-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -ARG PGIS1_CMAKE_BUILD_TYPE -ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} - -FROM builder as cgal-sfcgal-builder - -# cgal & sfcgal -ARG PGIS1_SFCGAL_REPOSITORY -ENV PGIS1_SFCGAL_REPOSITORY ${PGIS1_SFCGAL_REPOSITORY} -ARG PGIS1_SFCGAL_CHECKOUT -ENV PGIS1_SFCGAL_CHECKOUT ${PGIS1_SFCGAL_CHECKOUT} -ARG PGIS1_SFCGAL_CHECKOUT_SHA1 - -ARG PGIS1_CGAL_REPOSITORY -ENV PGIS1_CGAL_REPOSITORY ${PGIS1_CGAL_REPOSITORY} -ARG PGIS1_CGAL_CHECKOUT -ENV PGIS1_CGAL_CHECKOUT ${PGIS1_CGAL_CHECKOUT} -ARG PGIS1_CGAL_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir cgal \ - && cd cgal \ - && git init \ - && git remote add origin ${PGIS1_CGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_CGAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_CGAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_CGAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_CGAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_CGAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping CGAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_CGAL_CHECKOUT_SHA1}" ]; then \ - echo "CGAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_cgal_last_commit.txt \ - && cd /usr/src \ - && mkdir SFCGAL \ - && cd SFCGAL \ - && git init \ - && git remote add origin ${PGIS1_SFCGAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_SFCGAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_SFCGAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_SFCGAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_SFCGAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_SFCGAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping SFCGAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_SFCGAL_CHECKOUT_SHA1}" ]; then \ - echo "SFCGAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_sfcgal_last_commit.txt \ - && mkdir cmake-build \ - && cd cmake-build \ - && cmake .. \ - -DCGAL_DIR=/usr/src/cgal \ - -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ - -DSFCGAL_BUILD_BENCH=OFF \ - -DSFCGAL_BUILD_EXAMPLES=OFF \ - -DSFCGAL_BUILD_TESTS=OFF \ - -DSFCGAL_WITH_OSG=OFF \ - && make -j$(nproc) \ - && make install \ - # clean - && rm -fr /usr/src/SFCGAL \ - && rm -fr /usr/src/cgal - - -FROM builder as proj-builder - -# proj -ARG PGIS1_PROJ_REPOSITORY -ENV PGIS1_PROJ_REPOSITORY ${PGIS1_PROJ_REPOSITORY} -ARG PGIS1_PROJ_CHECKOUT -ENV PGIS1_PROJ_CHECKOUT ${PGIS1_PROJ_CHECKOUT} -ARG PGIS1_PROJ_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir PROJ \ - && cd PROJ \ - && git init \ - && git remote add origin ${PGIS1_PROJ_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_PROJ_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_PROJ_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_PROJ_CHECKOUT_SHA1 - && if [ -z "${PGIS1_PROJ_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_PROJ_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping PROJ SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_PROJ_CHECKOUT_SHA1}" ]; then \ - echo "PROJ SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_proj_last_commit.txt \ - # check the autotools exist? https://github.com/OSGeo/PROJ/pull/3027 - && if [ -f "autogen.sh" ] ; then \ - set -eux \ - && echo "autotools version: 'autogen.sh' exists! Older version!" \ - && ./autogen.sh \ - && ./configure --disable-static \ - && make -j$(nproc) \ - && make install \ - ; \ - else \ - set -eux \ - && echo "cmake version: 'autogen.sh' does not exists! Newer version!" \ - && mkdir build \ - && cd build \ - && cmake .. -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} -DBUILD_TESTING=OFF \ - && make -j$(nproc) \ - && make install \ - ; \ - fi \ - \ - && rm -fr /usr/src/PROJ - - -FROM builder as geos-builder - -# geos -ARG PGIS1_GEOS_REPOSITORY -ENV PGIS1_GEOS_REPOSITORY ${PGIS1_GEOS_REPOSITORY} -ARG PGIS1_GEOS_CHECKOUT -ENV PGIS1_GEOS_CHECKOUT ${PGIS1_GEOS_CHECKOUT} -ARG PGIS1_GEOS_CHECKOUT_SHA1 - -RUN set -eux \ - && cd /usr/src \ - && mkdir geos \ - && cd geos \ - && git init \ - && git remote add origin ${PGIS1_GEOS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_GEOS_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_GEOS_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_GEOS_CHECKOUT_SHA1 - && if [ -z "${PGIS1_GEOS_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_GEOS_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping GEOS SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_GEOS_CHECKOUT_SHA1}" ]; then \ - echo "GEOS SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_geos_last_commit.txt \ - && mkdir cmake-build \ - && cd cmake-build \ - && 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 PGIS1_GDAL_REPOSITORY -ENV PGIS1_GDAL_REPOSITORY ${PGIS1_GDAL_REPOSITORY} -ARG PGIS1_GDAL_CHECKOUT -ENV PGIS1_GDAL_CHECKOUT ${PGIS1_GDAL_CHECKOUT} -ARG PGIS1_GDAL_CHECKOUT_SHA1 - - - -# Install Arrow C++ -# also check the "Build final image" section too, for the final installation -RUN set -eux \ - # add backports \ - && apt-get update \ - && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get update \ - # Automatically determine the latest PGIS1 Arrow version and SOVERSION - && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ - && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ - && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ - && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ - && echo "Detected PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" \ - # Backup the version variables - reusing in a later stage - && echo "PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" > /_pgis1_arrow_environment.env \ - && echo "PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" >> /_pgis1_arrow_environment.env \ - # Install Arrow C++ - && apt-get install -y --no-install-recommends \ - libarrow${PGIS1_ARROW_SOVERSION} \ - libparquet${PGIS1_ARROW_SOVERSION} \ - libarrow-dataset${PGIS1_ARROW_SOVERSION} \ - libarrow-dev=${PGIS1_ARROW_VERSION} \ - libparquet-dev=${PGIS1_ARROW_VERSION} \ - libarrow-acero-dev=${PGIS1_ARROW_VERSION} \ - libarrow-dataset-dev=${PGIS1_ARROW_VERSION} \ - \ - libblosc-dev \ - libcfitsio-dev \ - libfreexl-dev \ - libfyba-dev \ - libhdf5-dev \ - libheif-dev \ - libkml-dev \ - libnetcdf-dev \ - libopenjp2-7-dev \ - libpng-dev \ - libqhull-dev \ - libspatialite-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -## GDAL_build-end - -RUN set -eux \ - && ldconfig \ - && cd /usr/src \ - && mkdir gdal \ - && cd gdal \ - && git init \ - && git remote add origin ${PGIS1_GDAL_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_GDAL_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_GDAL_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_GDAL_CHECKOUT_SHA1 - && if [ -z "${PGIS1_GDAL_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_GDAL_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping GDAL SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_GDAL_CHECKOUT_SHA1}" ]; then \ - echo "GDAL SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_gdal_last_commit.txt \ - \ - # gdal project directory structure - has been changed ! - && if [ -d "gdal" ] ; then \ - echo "Directory 'gdal' dir exists -> older version!" ; \ - cd gdal ; \ - else \ - echo "Directory 'gdal' does not exists! Newer version! " ; \ - fi \ - \ - && if [ -f "./autogen.sh" ]; then \ - # Building with autoconf ( old/deprecated ) - set -eux \ - && ./autogen.sh \ - && ./configure --disable-static \ - ; \ - else \ - # Building with cmake - set -eux \ - && mkdir build \ - && cd build \ - # config based on: https://salsa.debian.org/debian-gis-team/gdal/-/blob/master/debian/rules - && cmake .. \ - -DCMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ - -DBUILD_TESTING=OFF \ - -DBUILD_DOCS=OFF \ - \ - -DGDAL_HIDE_INTERNAL_SYMBOLS=ON \ - -DRENAME_INTERNAL_TIFF_SYMBOLS=ON \ - -DGDAL_USE_CURL=ON \ - -DGDAL_USE_DEFLATE=ON \ - -DGDAL_USE_EXPAT=ON \ - -DGDAL_USE_GEOS=ON \ - -DGDAL_USE_JSONC=ON \ - -DGDAL_USE_LIBLZMA=ON \ - -DGDAL_USE_LIBXML2=ON \ - -DGDAL_USE_LZ4=ON \ - -DGDAL_USE_POSTGRESQL=ON \ - -DGDAL_USE_SQLITE3=ON \ - -DGDAL_USE_TIFF=ON \ - -DGDAL_USE_WEBP=ON \ - -DGDAL_USE_ZLIB=ON \ - -DGDAL_USE_ZSTD=ON \ - \ - -DGDAL_USE_ARROW=ON \ - -DGDAL_USE_ARROWDATASET=ON \ - -DGDAL_USE_BLOSC=ON \ - -DGDAL_USE_CFITSIO=ON \ - -DGDAL_USE_FREEXL=ON \ - -DGDAL_USE_FYBA=ON \ - -DGDAL_USE_HDF5=ON \ - -DGDAL_USE_HEIF=ON \ - -DGDAL_USE_LERC_INTERNAL=ON \ - -DGDAL_USE_LIBKML=ON \ - -DGDAL_USE_NETCDF=ON \ - -DGDAL_USE_OPENJPEG=ON \ - -DGDAL_USE_PARQUET=ON \ - -DGDAL_USE_PNG=ON \ - -DGDAL_USE_QHULL=ON \ - -DGDAL_USE_SPATIALITE=ON \ - ; \ - fi \ - \ - && make -j$(nproc) \ - && make install \ - && cd / \ - && rm -fr /usr/src/gdal - -# Minimal command line test. -RUN set -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - && pcre-config --version - -# ------------------------------------------- -# final stage -# ------------------------------------------- -FROM ${PGIS1_BASE_IMAGE} - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS - 17rc1-recent spatial database extension with PostgreSQL 17rc1 bookworm" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ARG PGIS1_CMAKE_BUILD_TYPE -ARG PGIS1_BASE_IMAGE -ARG PGIS1_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 -eux \ - && apt-get update \ - && apt-get install -y -V --no-install-recommends \ - \ - curl \ - 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 \ - libgmpxx4ldbl \ - libjson-c5 \ - libmpfr6 \ - libpcre3 \ - libprotobuf-c1 \ - libtiff6 \ - libxml2 \ - sqlite3 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=stage0-builder /_pgis*.* / -COPY --from=stage0-builder /usr/local /usr/local - -# Install Arrow + Parquet + other GDAL extra dependencies - -RUN set -eux \ - # Install Arrow + Parquet - && apt-get update \ - && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ - && apt-get update \ - # Load the PGIS1_ARROW version variables - && . /_pgis1_arrow_environment.env \ - # Use the PGIS1_ARROW_SOVERSION as needed - && echo "Using PGIS1_ARROW_SOVERSION=$PGIS1_ARROW_SOVERSION" \ - && apt-get install -y -V --no-install-recommends \ - libarrow${PGIS1_ARROW_SOVERSION} \ - libparquet${PGIS1_ARROW_SOVERSION} \ - libarrow-dataset${PGIS1_ARROW_SOVERSION} \ - \ - # Install GDAL extra dependencies - libblosc1 \ - libcrypto++8 \ - libfreexl1 \ - libfyba0 \ - libhdf5-103-1 \ - libheif1 \ - libkmlbase1 \ - libkmldom1 \ - libkmlengine1 \ - libnetcdf19 \ - libopenjp2-7 \ - libpng16-16 \ - libqhull-r8.0 \ - librasterlite2-1 \ - libspatialite7 \ - netcdf-bin \ - libcfitsio10 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - - -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 -ARG PGIS1_POSTGIS_CHECKOUT_SHA1 - -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 -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && gdal-config --formats \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - \ - # Testing ogr2ogr PostgreSQL driver. - && ogr2ogr --formats | grep -q "PostgreSQL/PostGIS" && exit 0 \ - || echo "ogr2ogr missing PostgreSQL driver" && exit 1 - -# Specify GDAL_CONFIG and LD_LIBRARY_PATH for PostGIS build; -# The arm64 build is very senitive. -ENV GDAL_CONFIG /usr/local/bin/gdal-config -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - -# 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 -eux \ - && apt-get update \ - && apt-get install -y --no-install-recommends \ - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - ca-certificates \ - cmake \ - docbook-xml \ - docbook5-xml \ - g++ \ - git \ - libboost-all-dev \ - libcunit1-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - pkg-config \ - postgresql-server-dev-$PG_MAJOR \ - protobuf-c-compiler \ - xsltproc \ - && cd \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && git remote add origin ${PGIS1_POSTGIS_REPOSITORY} \ - && git fetch --depth 1 origin ${PGIS1_POSTGIS_CHECKOUT} \ - && git checkout FETCH_HEAD \ - # Skip SHA1 check if PGIS1_POSTGIS_CHECKOUT_SHA1 is empty or 'nocheck' - # Otherwise, verify that the commit hash matches PGIS1_POSTGIS_CHECKOUT_SHA1 - && if [ -z "${PGIS1_POSTGIS_CHECKOUT_SHA1}" ] \ - || [ "${PGIS1_POSTGIS_CHECKOUT_SHA1}" = "nocheck" ]; then \ - echo "Skipping POSTGIS SHA1 check"; \ - else \ - if [ "$(git rev-parse HEAD)" != "${PGIS1_POSTGIS_CHECKOUT_SHA1}" ]; then \ - echo "POSTGIS SHA1 problem! Stop!"; \ - exit 1; \ - fi; \ - fi \ - && git log -1 > /_pgis_last_commit.txt \ - && ldconfig \ - && ./autogen.sh \ -# configure options taken from: -# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ -# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316 - && if command -v projsync >/dev/null 2>&1; then \ - projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn ; \ - fi \ -# regress check - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && ldconfig \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# clean - && cd / \ - && rm -rf /usr/src/postgis \ - && apt-get purge -y --autoremove \ - autoconf \ - automake \ - autotools-dev \ - bison \ - build-essential \ - cmake \ - docbook-xml \ - docbook5-xml \ - g++ \ - git \ - libboost-all-dev \ - libcurl4-gnutls-dev \ - libgmp-dev \ - libjson-c-dev \ - libmpfr-dev \ - libpcre3-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtiff-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - pkg-config \ - postgresql-server-dev-$PG_MAJOR \ - protobuf-c-compiler \ - xsltproc \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin - -# last final test -RUN set -eux \ - && ldconfig \ - && cs2cs \ - && ldd $(which gdalinfo) \ - && gdalinfo --version \ - && gdal-config --formats \ - && geos-config --version \ - && ogr2ogr --version \ - && proj \ - && sfcgal-config --version \ - # check any missing dependencies - && ldd /usr/lib/postgresql/$PG_MAJOR/lib/*.so | grep 'not found' && exit 1 || true \ - \ - # Is the "ca-certificates" package installed? (for accessing remote raster files) - # https://github.com/postgis/docker-postgis/issues/307 - && dpkg-query -W -f='${Status}' ca-certificates 2>/dev/null | grep -c "ok installed" \ - \ - # list last commits. - && find /_pgis*_commit.txt -type f -print -exec cat {} \; \ - # list postgresql, postgis version - && cat _pgis_full_version.txt diff --git a/17rc1-recent/bookworm/initdb-postgis.sh b/17rc1-recent/bookworm/initdb-postgis.sh deleted file mode 100644 index 21f8c373d..000000000 --- a/17rc1-recent/bookworm/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2154 -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<-'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/17rc1-recent/bookworm/tags b/17rc1-recent/bookworm/tags deleted file mode 100644 index 9ec93eee0..000000000 --- a/17rc1-recent/bookworm/tags +++ /dev/null @@ -1 +0,0 @@ -17rc1-recent-bookworm 17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 17rc1-recent diff --git a/17rc1-recent/bookworm/update-postgis.sh b/17rc1-recent/bookworm/update-postgis.sh deleted file mode 100755 index f98abd261..000000000 --- a/17rc1-recent/bookworm/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/18-3.5/alpine3.22/Dockerfile b/18-3.5/alpine3.22/Dockerfile new file mode 100644 index 000000000..4b81af82e --- /dev/null +++ b/18-3.5/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:18beta1-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 18 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.5.3" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 18 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.5.3" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/16-l3.5.0rc1/bookworm/initdb-postgis.sh b/18-3.5/alpine3.22/initdb-postgis.sh similarity index 100% rename from 16-l3.5.0rc1/bookworm/initdb-postgis.sh rename to 18-3.5/alpine3.22/initdb-postgis.sh diff --git a/18-3.5/alpine3.22/tags b/18-3.5/alpine3.22/tags new file mode 100644 index 000000000..b03529025 --- /dev/null +++ b/18-3.5/alpine3.22/tags @@ -0,0 +1 @@ +18beta1-3.5-alpine3.22 18beta1-3.5.3-alpine3.22 18beta1-3.5-alpine diff --git a/16-l3.5.0rc1/bookworm/update-postgis.sh b/18-3.5/alpine3.22/update-postgis.sh similarity index 100% rename from 16-l3.5.0rc1/bookworm/update-postgis.sh rename to 18-3.5/alpine3.22/update-postgis.sh diff --git a/18-3.5/bookworm/Dockerfile b/18-3.5/bookworm/Dockerfile new file mode 100644 index 000000000..8b1a47438 --- /dev/null +++ b/18-3.5/bookworm/Dockerfile @@ -0,0 +1,93 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.debian.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG PGIS1_BASE_IMAGE=postgres:18beta1-bookworm +ARG PGIS1_POSTGRES_MAJOR=18 +ARG PGIS1_POSTGIS_VERSION=3.5.3+dfsg-1~exp1.pgdg120+1 +ARG PGIS1_POSTGIS_MAJOR=3 + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/17rc1-3.4/alpine3.20/initdb-postgis.sh b/18-3.5/bookworm/initdb-postgis.sh similarity index 100% rename from 17rc1-3.4/alpine3.20/initdb-postgis.sh rename to 18-3.5/bookworm/initdb-postgis.sh diff --git a/18-3.5/bookworm/tags b/18-3.5/bookworm/tags new file mode 100644 index 000000000..69158bc12 --- /dev/null +++ b/18-3.5/bookworm/tags @@ -0,0 +1 @@ +18beta1-3.5-bookworm 18beta1-3.5.3-bookworm 18beta1-3.5 diff --git a/17rc1-3.4/alpine3.20/update-postgis.sh b/18-3.5/bookworm/update-postgis.sh similarity index 100% rename from 17rc1-3.4/alpine3.20/update-postgis.sh rename to 18-3.5/bookworm/update-postgis.sh diff --git a/18-3.6/alpine3.22/Dockerfile b/18-3.6/alpine3.22/Dockerfile new file mode 100644 index 000000000..4e6032450 --- /dev/null +++ b/18-3.6/alpine3.22/Dockerfile @@ -0,0 +1,222 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.alpine.template" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +ARG PGIS1_BASE_IMAGE=postgres:18beta1-alpine3.22 +ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.6.0alpha1 +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=b32829d707ef65515df1224361b9f2d5889db348 + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 18 alpine3.22" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="3.6.0alpha1" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL 18 alpine3.22" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="3.6.0alpha1" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/17rc1-3.5/alpine3.19/initdb-postgis.sh b/18-3.6/alpine3.22/initdb-postgis.sh similarity index 100% rename from 17rc1-3.5/alpine3.19/initdb-postgis.sh rename to 18-3.6/alpine3.22/initdb-postgis.sh diff --git a/18-3.6/alpine3.22/tags b/18-3.6/alpine3.22/tags new file mode 100644 index 000000000..54c6f7cf4 --- /dev/null +++ b/18-3.6/alpine3.22/tags @@ -0,0 +1 @@ +18beta1-3.6.0alpha1-alpine3.22 18beta1-3.6.0alpha1-alpine diff --git a/17rc1-3.5/alpine3.19/update-postgis.sh b/18-3.6/alpine3.22/update-postgis.sh similarity index 100% rename from 17rc1-3.5/alpine3.19/update-postgis.sh rename to 18-3.6/alpine3.22/update-postgis.sh diff --git a/15-master/bookworm/Dockerfile b/18-master/bookworm/Dockerfile similarity index 86% rename from 15-master/bookworm/Dockerfile rename to 18-master/bookworm/Dockerfile index ac8f3d116..56a6fe614 100644 --- a/15-master/bookworm/Dockerfile +++ b/18-master/bookworm/Dockerfile @@ -1,12 +1,16 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS1_BASE_IMAGE=postgres:15-bookworm +ARG PGIS1_BASE_IMAGE=postgres:18beta1-bookworm + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- 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 PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS - 18-master spatial database extension with PostgreSQL 18 bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="18-master" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 18-master spatial database extension with PostgreSQL 18 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="18-master" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/17rc1-3.5/alpine3.20/initdb-postgis.sh b/18-master/bookworm/initdb-postgis.sh similarity index 100% rename from 17rc1-3.5/alpine3.20/initdb-postgis.sh rename to 18-master/bookworm/initdb-postgis.sh diff --git a/18-master/bookworm/tags b/18-master/bookworm/tags new file mode 100644 index 000000000..62a4c5766 --- /dev/null +++ b/18-master/bookworm/tags @@ -0,0 +1 @@ +18beta1-master-bookworm 18beta1-master diff --git a/17rc1-3.5/alpine3.20/update-postgis.sh b/18-master/bookworm/update-postgis.sh similarity index 100% rename from 17rc1-3.5/alpine3.20/update-postgis.sh rename to 18-master/bookworm/update-postgis.sh diff --git a/15-recent/bookworm/Dockerfile b/18-recent/bookworm/Dockerfile similarity index 84% rename from 15-recent/bookworm/Dockerfile rename to 18-recent/bookworm/Dockerfile index fda6ffb34..055555d3a 100644 --- a/15-recent/bookworm/Dockerfile +++ b/18-recent/bookworm/Dockerfile @@ -1,12 +1,16 @@ # -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# source: "Dockerfile.master.template" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" +# source: "./templates/Dockerfile.master.template" # PLEASE DO NOT EDIT IT DIRECTLY. # # "Experimental"; solely for testing purposes. Anticipate frequent changes! # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. -ARG PGIS1_BASE_IMAGE=postgres:15-bookworm +ARG PGIS1_BASE_IMAGE=postgres:18beta1-bookworm + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" ARG PGIS1_POSTGIS_REPOSITORY=https://github.com/postgis/postgis.git ARG PGIS1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git @@ -16,21 +20,21 @@ ARG PGIS1_SFCGAL_REPOSITORY=https://gitlab.com/sfcgal/SFCGAL.git ARG PGIS1_CGAL_REPOSITORY=https://github.com/CGAL/cgal.git # Should valid git checkout ( SHA1, tags, branches ) -ARG PGIS1_POSTGIS_CHECKOUT=tags/3.4.3 -ARG PGIS1_GEOS_CHECKOUT=tags/3.13.0 -ARG PGIS1_GDAL_CHECKOUT=tags/v3.9.2 -ARG PGIS1_PROJ_CHECKOUT=tags/9.5.0 -ARG PGIS1_SFCGAL_CHECKOUT=tags/v1.5.2 -ARG PGIS1_CGAL_CHECKOUT=tags/v5.6.1 +ARG PGIS1_POSTGIS_CHECKOUT=tags/3.5.3 +ARG PGIS1_GEOS_CHECKOUT=tags/3.13.1 +ARG PGIS1_GDAL_CHECKOUT=tags/v3.11.1 +ARG PGIS1_PROJ_CHECKOUT=tags/9.6.2 +ARG PGIS1_SFCGAL_CHECKOUT=tags/v2.1.0 +ARG PGIS1_CGAL_CHECKOUT=tags/v6.0.1 # Skip SHA1 check if PGIS1_*_CHECKOUT_SHA1 is empty or 'nocheck' # Otherwise, verify that the commit hash matches -ARG PGIS1_POSTGIS_CHECKOUT_SHA1=e36594574671877ca6178c944e6d430f87f310bf -ARG PGIS1_GEOS_CHECKOUT_SHA1=d7957246c588aa9c690efe67924fd70e741a06ab -ARG PGIS1_GDAL_CHECKOUT_SHA1=3aae5b4cf30c958ab339157b4f8115922e2f2562 -ARG PGIS1_PROJ_CHECKOUT_SHA1=0a407325fbb5bf42407a7dc5d4f948be9707e302 -ARG PGIS1_SFCGAL_CHECKOUT_SHA1=5584600ad7ed512f158b297476f57ed5fcf9c8dc -ARG PGIS1_CGAL_CHECKOUT_SHA1=188e51bad36ffc30e49dbabda29620b71a84664c +ARG PGIS1_POSTGIS_CHECKOUT_SHA1=aab5f55897aa2e8eb5f17c3996b61268c5f1ec91 +ARG PGIS1_GEOS_CHECKOUT_SHA1=431568d6e311e0bbfb057b4ec3d44d0d3ba3335f +ARG PGIS1_GDAL_CHECKOUT_SHA1=226b7732b4672deaf35d6a16a39216047358f7d8 +ARG PGIS1_PROJ_CHECKOUT_SHA1=7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54 +ARG PGIS1_SFCGAL_CHECKOUT_SHA1=60573cfb6b3fc01eceda563d275a226317ba01db +ARG PGIS1_CGAL_CHECKOUT_SHA1=50cfbde3b84dbeae8338268db2d78fe4fcb522de ARG PGIS1_BOOST_VERSION=1.74.0 ARG PGIS1_CMAKE_BUILD_TYPE=Release @@ -43,10 +47,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD=with_extra" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -292,12 +305,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -437,9 +452,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ - 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 PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS - 18-recent spatial database extension with PostgreSQL 18 bookworm" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="18-recent" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - 18-recent spatial database extension with PostgreSQL 18 bookworm" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="18-recent" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -450,7 +482,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -487,7 +522,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-bookworm.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-bookworm.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -669,6 +705,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/17rc1-l3.5.0rc1/bookworm/initdb-postgis.sh b/18-recent/bookworm/initdb-postgis.sh similarity index 100% rename from 17rc1-l3.5.0rc1/bookworm/initdb-postgis.sh rename to 18-recent/bookworm/initdb-postgis.sh diff --git a/18-recent/bookworm/tags b/18-recent/bookworm/tags new file mode 100644 index 000000000..2f0f24802 --- /dev/null +++ b/18-recent/bookworm/tags @@ -0,0 +1 @@ +18beta1-recent-bookworm 18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 18beta1-recent diff --git a/17rc1-l3.5.0rc1/bookworm/update-postgis.sh b/18-recent/bookworm/update-postgis.sh similarity index 100% rename from 17rc1-l3.5.0rc1/bookworm/update-postgis.sh rename to 18-recent/bookworm/update-postgis.sh diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template deleted file mode 100644 index d24e58eca..000000000 --- a/Dockerfile.alpine.template +++ /dev/null @@ -1,135 +0,0 @@ - -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 ${PGIS1_BASE_IMAGE} - -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 ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -RUN set -eux \ - && apk add --no-cache --virtual .build-deps \ - \ - ca-certificates \ - gdal-dev \ - geos-dev \ - proj-dev \ - proj-util \ - sfcgal-dev \ - \ - # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains - # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. - # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 - $DOCKER_PG_LLVM_DEPS \ - \ - autoconf \ - automake \ - bison \ - cunit-dev \ - file \ - g++ \ - gcc \ - gettext-dev \ - git \ - json-c-dev \ - libtool \ - libxml2-dev \ - libxml2-utils \ - make \ - # Note: PCRE2 is not supported in older versions of PostGIS. - # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. - # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. - pcre-dev \ - perl \ - protobuf-c-dev \ - \ - # postgis - && cd /usr/src \ - && mkdir postgis \ - && cd postgis \ - && git init \ - && 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)" != "$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 \ - && gettextize \ - && ./autogen.sh \ - && ./configure \ - --enable-lto \ - && make -j$(nproc) \ - && make install \ - \ -# This section is for refreshing the proj data for the regression tests. -# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 -# This increases the Docker image size by about 1 MB. - && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ - && projsync --system-directory --file us_noaa_eshpgn \ - && projsync --system-directory --file us_noaa_prvi \ - && projsync --system-directory --file us_noaa_wmhpgn \ -# This section performs a regression check. - && mkdir /tempdb \ - && chown -R postgres:postgres /tempdb \ - && su postgres -c 'pg_ctl -D /tempdb init' \ - && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ - && cd regress \ - && make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \ - \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ - && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ - && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ - && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ - \ - && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ - && rm -rf /tempdb \ - && rm -rf /tmp/logfile \ - && rm -rf /tmp/pgis_reg \ -# add .postgis-rundeps - && apk add --no-cache --virtual .postgis-rundeps \ - \ - gdal \ - geos \ - proj \ - sfcgal \ - \ - json-c \ - libstdc++ \ - pcre \ - protobuf-c \ - \ - # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 - perl \ - # ca-certificates: for accessing remote raster files - # fix https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ -# clean - && cd / \ - && 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 - -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/Dockerfile.debian.template b/Dockerfile.debian.template deleted file mode 100644 index 4800d1616..000000000 --- a/Dockerfile.debian.template +++ /dev/null @@ -1,38 +0,0 @@ -FROM postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} - -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.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR {{ .[env.variant].POSTGIS_MAJOR }} -ENV POSTGIS_VERSION {{ .[env.variant].POSTGIS_VERSION }} - -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; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ -{{ if env.version | startswith("11") then ( -}} - # \ -{{ ) else ( -}} - postgis \ -{{ ) end -}} - && rm -rf /var/lib/apt/lists/* - -# multiple LLVM existance is not allowed. -RUN set -eux \ - && dpkg -l | grep llvm \ - && 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."; \ - exit 1; \ - fi - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin diff --git a/Makefile b/Makefile index 040f3b2da..76207116c 100644 --- a/Makefile +++ b/Makefile @@ -30,11 +30,17 @@ endif IMAGE_VERSION_ID :="" ifeq ($(ENABLE_IMAGE_VERSION_ID),true) - # Note: Make sure to keep this synchronized with the corresponding section in ./tools/environment_init.sh - COMMIT_DATE=$(shell git log -1 --format=%cd --date=format:%Y%m%d) - COMMIT_HASH=$(shell git log -1 --pretty=format:%h) - BUILD_WEEK=$(shell date '+%Yw%V') - IMAGE_VERSION_ID=-ver$(COMMIT_DATE)-$(COMMIT_HASH)-$(BUILD_WEEK) +# Note: Make sure to keep this synchronized with the corresponding section in ./tools/environment_init.sh +ifeq ($(shell git rev-parse --git-dir 2>/dev/null),) +$(warning Warning: Not in a git repository. Using fallback values for IMAGE_VERSION_ID.) +COMMIT_DATE=00000000 +COMMIT_HASH=00000000 +else +COMMIT_DATE=$(shell git log -1 --format='%cd' --date=format:'%Y%m%d') +COMMIT_HASH=$(shell git log -1 --pretty=format:'%h') +endif +BUILD_WEEK=$(shell date '+%Yw%V') +IMAGE_VERSION_ID=-ver$(COMMIT_DATE)-$(COMMIT_HASH)-$(BUILD_WEEK) endif PUSH_FULL_IMAGENAME = ;$(DOCKER) image push $(REGISTRY)/$(REPO_NAME)/$(IMAGE_NAME): @@ -55,8 +61,8 @@ OFFIMG_REPO_URL ?=https://github.com/docker-library/official-images.git # the existence of Dockerfile at the depth of two directories # where the first directory names starting with a number. DOCKERFILE_DIRS := $(shell find . -mindepth 2 -maxdepth 2 -type d -exec test -e '{}/Dockerfile' \; -print | sed 's|./||' | awk '/^[0-9]/ {print}') -VERSIONS := $(sort $(shell echo '$(DOCKERFILE_DIRS)' | tr ' ' '\n' | cut -d'/' -f1)) -VARIANTS := $(sort $(shell echo '$(DOCKERFILE_DIRS)' | tr ' ' '\n' | cut -d'/' -f2)) +VERSIONS := $(sort $(foreach dir,$(DOCKERFILE_DIRS),$(firstword $(subst /, ,$(dir))))) +VARIANTS := $(sort $(foreach dir,$(DOCKERFILE_DIRS),$(lastword $(subst /, ,$(dir))))) check_variant: ifeq ($(VARIANT),default) @@ -304,6 +310,138 @@ imageclean: imageclean_${REPO_NAME}_${IMAGE_NAME}: docker image ls | grep "^${REPO_NAME}/${IMAGE_NAME}" | awk '{print $$3}' | sort -u | xargs -rt docker rmi -f +# Add new PostgreSQL version support +# Usage: make add-postgres-version PG_VERSION=19 POSTGIS_VERSION=3.5 TYPE=master +# TYPE options: master (latest debian), postgis (all debian+alpine variants), bundle (latest debian) +add-postgres-version: + @if [ -z "$(PG_VERSION)" ]; then \ + echo "Error: PG_VERSION is required."; \ + echo "Usage: make add-postgres-version PG_VERSION=19 POSTGIS_VERSION=3.5 TYPE=master"; \ + echo " TYPE options: master (latest debian), postgis (all debian+alpine), bundle (latest debian)"; \ + exit 1; \ + fi + @if [ -z "$(POSTGIS_VERSION)" ]; then \ + echo "Error: POSTGIS_VERSION is required."; \ + echo "Usage: make add-postgres-version PG_VERSION=19 POSTGIS_VERSION=3.5 TYPE=master"; \ + echo " TYPE options: master (latest debian), postgis (all debian+alpine), bundle (latest debian)"; \ + exit 1; \ + fi + @if [ -z "$(TYPE)" ]; then \ + echo "Error: TYPE is required."; \ + echo "Usage: make add-postgres-version PG_VERSION=19 POSTGIS_VERSION=3.5 TYPE=master"; \ + echo " TYPE options: master (latest debian), postgis (all debian+alpine), bundle (latest debian)"; \ + exit 1; \ + fi + @echo "Adding PostgreSQL $(PG_VERSION) with PostGIS $(POSTGIS_VERSION) support ($(TYPE) type)..." + @echo "Step 1: Adding $(PG_VERSION) to tools/versions.sh postgres_versions" + @if ! grep -q " $(PG_VERSION)" tools/versions.sh; then \ + sed -i 's/postgres_versions="\([^"]*\)"/postgres_versions="\1 $(PG_VERSION)"/' tools/versions.sh; \ + echo " Added $(PG_VERSION) to postgres_versions"; \ + else \ + echo " $(PG_VERSION) already exists in postgres_versions"; \ + fi + @echo "Step 2: Creating directory structure based on type $(TYPE)" + @DEBIAN_VARIANTS=$$(grep '^debian_variants=' tools/versions.sh | cut -d'"' -f2 | xargs); \ + ALPINE_VARIANTS=$$(grep '^alpine_variants=' tools/versions.sh | cut -d'"' -f2 | xargs); \ + DEBIAN_LATEST=$$(grep '^debian_latest=' tools/versions.sh | cut -d'"' -f2); \ + if [ "$(TYPE)" = "master" ]; then \ + echo " Creating master variant ($$DEBIAN_LATEST only)"; \ + mkdir -p $(PG_VERSION)-master/$$DEBIAN_LATEST; \ + touch $(PG_VERSION)-master/$$DEBIAN_LATEST/Dockerfile; \ + elif [ "$(TYPE)" = "postgis" ]; then \ + echo " Creating PostGIS variant (all debian + alpine variants)"; \ + for variant in $$DEBIAN_VARIANTS $$ALPINE_VARIANTS; do \ + echo " Creating $(PG_VERSION)-$(POSTGIS_VERSION)/$$variant"; \ + mkdir -p $(PG_VERSION)-$(POSTGIS_VERSION)/$$variant; \ + touch $(PG_VERSION)-$(POSTGIS_VERSION)/$$variant/Dockerfile; \ + done; \ + elif [ "$(TYPE)" = "bundle" ]; then \ + echo " Creating bundle variant ($$DEBIAN_LATEST only)"; \ + mkdir -p $(PG_VERSION)-$(POSTGIS_VERSION)-bundle0/$$DEBIAN_LATEST; \ + touch $(PG_VERSION)-$(POSTGIS_VERSION)-bundle0/$$DEBIAN_LATEST/Dockerfile; \ + else \ + echo "Error: Invalid TYPE. Must be master, postgis, or bundle"; \ + exit 1; \ + fi + @echo "Step 3: Adding configuration to locked.yml" + @if [ "$(TYPE)" = "master" ]; then \ + echo "" >> locked.yml; \ + echo "'$(PG_VERSION)-master':" >> locked.yml; \ + echo " 'bookworm':" >> locked.yml; \ + echo " _comment: \"source: ./locked.yml - PostgreSQL $(PG_VERSION) master testing\"" >> locked.yml; \ + echo " tags: '$(PG_VERSION)-master-bookworm $(PG_VERSION)-master'" >> locked.yml; \ + echo " postgis: 'master'" >> locked.yml; \ + echo " readme_group: 'test'" >> locked.yml; \ + echo " PG_MAJOR: '$(PG_VERSION)'" >> locked.yml; \ + echo " PG_DOCKER: '$(PG_VERSION)beta1'" >> locked.yml; \ + echo " arch: 'amd64 arm64'" >> locked.yml; \ + echo " template: 'Dockerfile.master.template'" >> locked.yml; \ + echo " initfile: 'initdb-postgis.sh'" >> locked.yml; \ + echo " POSTGIS_CHECKOUT: 'master'" >> locked.yml; \ + echo " POSTGIS_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " CGAL_CHECKOUT: 'master'" >> locked.yml; \ + echo " CGAL_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " SFCGAL_CHECKOUT: 'master'" >> locked.yml; \ + echo " SFCGAL_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " PROJ_CHECKOUT: 'master'" >> locked.yml; \ + echo " PROJ_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " GDAL_BUILD: 'with_extra'" >> locked.yml; \ + echo " GDAL_CHECKOUT: 'master'" >> locked.yml; \ + echo " GDAL_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " GEOS_CHECKOUT: 'main'" >> locked.yml; \ + echo " GEOS_CHECKOUT_SHA1: 'nocheck'" >> locked.yml; \ + echo " BOOST_VERSION: '1.74.0'" >> locked.yml; \ + echo " Added $(PG_VERSION)-master configuration to locked.yml"; \ + else \ + echo " For PostGIS/bundle variants, configuration will be auto-generated by update.sh"; \ + fi + @echo "Step 4: Adding optional pg_hint_plan support to tools/versions.sh" + @if ! grep -q "get_latest_version_and_hash_optional.*REL$(PG_VERSION)" tools/versions.sh; then \ + sed -i '/get_latest_version_and_hash_optional.*REL18/a get_latest_version_and_hash_optional "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL$(PG_VERSION) ""' tools/versions.sh; \ + echo " Added REL$(PG_VERSION) pg_hint_plan support"; \ + else \ + echo " REL$(PG_VERSION) pg_hint_plan support already exists"; \ + fi + @echo "" + @echo "✅ Successfully created PostgreSQL $(PG_VERSION) directory structure!" + @echo "" + @echo "Next steps:" + @echo " 1. Run update script: ./update.sh" + @if [ "$(TYPE)" = "master" ]; then \ + echo " 2. Build the image: make build-$(PG_VERSION)-master-bookworm"; \ + echo " 3. Test the image: make test-$(PG_VERSION)-master-bookworm"; \ + echo " 4. Start container: make start-$(PG_VERSION)-master-bookworm"; \ + echo " 5. Connect to DB: make psql-$(PG_VERSION)-master-bookworm"; \ + elif [ "$(TYPE)" = "postgis" ]; then \ + echo " 2. Build all variants: make build-$(PG_VERSION)-$(POSTGIS_VERSION)"; \ + echo " 3. Test all variants: make test-$(PG_VERSION)-$(POSTGIS_VERSION)"; \ + elif [ "$(TYPE)" = "bundle" ]; then \ + echo " 2. Build the bundle: make build-$(PG_VERSION)-$(POSTGIS_VERSION)-bundle0-bookworm"; \ + echo " 3. Test the bundle: make test-$(PG_VERSION)-$(POSTGIS_VERSION)-bundle0-bookworm"; \ + fi + @echo "" + @echo "Created directories:" + @DEBIAN_VARIANTS=$$(grep '^debian_variants=' tools/versions.sh | cut -d'"' -f2 | xargs); \ + ALPINE_VARIANTS=$$(grep '^alpine_variants=' tools/versions.sh | cut -d'"' -f2 | xargs); \ + DEBIAN_LATEST=$$(grep '^debian_latest=' tools/versions.sh | cut -d'"' -f2); \ + if [ "$(TYPE)" = "master" ]; then \ + echo " - $(PG_VERSION)-master/$$DEBIAN_LATEST/"; \ + elif [ "$(TYPE)" = "postgis" ]; then \ + for variant in $$DEBIAN_VARIANTS $$ALPINE_VARIANTS; do \ + echo " - $(PG_VERSION)-$(POSTGIS_VERSION)/$$variant/"; \ + done; \ + elif [ "$(TYPE)" = "bundle" ]; then \ + echo " - $(PG_VERSION)-$(POSTGIS_VERSION)-bundle0/$$DEBIAN_LATEST/"; \ + fi + @echo "" + @echo "Modified files:" + @echo " - tools/versions.sh (postgres_versions and pg_hint_plan)" + @if [ "$(TYPE)" = "master" ]; then \ + echo " - locked.yml (added $(PG_VERSION)-master configuration)"; \ + fi + @echo "" + @echo "Note: versions.json will be auto-generated when you run ./update.sh" + # Help target help: check_variant @echo ' Available make targets:' @@ -337,6 +475,7 @@ help: check_variant @echo '# clean docker image and volume' @echo $(foreach dir,$(DOCKERFILE_DIRS),' clean-$(word 1,$(subst /, ,$(dir)))-$(word 2,$(subst /, ,$(dir)))') @echo ' ' + @echo 'add-postgres-version PG_VERSION=X PG_DOCKER_TAG=Y : Add new PostgreSQL version support' @echo 'all : Local run: "update" "build" "test" (without push)' @echo 'check_version: Check the architecture and version id' @echo 'check-gh-rate: Check the github ratelimit' @@ -353,7 +492,7 @@ help: check_variant @echo 'You can check the the command without executing: make -n ' @echo ' ' -.PHONY: help build all update test-prepare test push push-readme manifest \ +.PHONY: help build all update test-prepare test push push-readme manifest add-postgres-version \ check-gh-rate check_version dockerlist lint imageclean imageclean_${REPO_NAME}_${IMAGE_NAME} \ $(foreach version,$(VERSIONS),' build-$(version)') \ $(foreach dir,$(DOCKERFILE_DIRS),' build-$(word 1,$(subst /, ,$(dir)))-$(word 2,$(subst /, ,$(dir)))') \ diff --git a/README.md b/README.md index b3e7d8ccb..e263ee52d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ **Important:** _Please note that this README document is larger than the 25,000 character limit set by Docker Hub. As a result, the version available on Docker Hub will be trimmed and not complete._ _For the complete and untrimmed version of the README, it is recommended to visit the project GitHub page:_ https://github.com/ImreSamu/docker-postgis/blob/master/README.md -The `imresamu/postgis` image provides tags for running Postgres with [PostGIS](http://postgis.net/) extensions installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides debian and alpine variants for PostGIS 3.4.x, which is compatible with PostgreSQL versions 12, 13, 14, 15, 16 and 17beta. Additionally, an image version is provided which is built from the latest two versions of Postgres (15, 16) with versions of PostGIS and its dependencies built from their respective master branches. +The `imresamu/postgis` image provides tags for running Postgres with [PostGIS](http://postgis.net/) extensions installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides debian and alpine variants for PostGIS which is compatible with PostgreSQL versions 13, 14, 15, 16 and 17. Additionally, an image version is provided which is built from the latest two versions of Postgres (16,17) with versions of PostGIS and its dependencies built from their respective master branches. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: @@ -30,7 +30,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 (2024-09-24) +## Versions (2025-07-01) We provide multi-platform image support for the following architectures: @@ -56,26 +56,26 @@ Notes: For those new to PostGIS, we recommend the following image versions: -- `imresamu/postgis:16-3.4-bookworm`: This image includes a minimal setup of PostgreSQL with the PostGIS extension. ( debian bookworm based, easy to extend with debian packages ) -- `imresamu/postgis:16-recent-bookworm`: (experimental) Latest postgis with the latest geos,proj,gdal,sfcgal. ( debian based, extending is complex ! ) -- `imresamu/postgis:16-3.4-bundle0-bookworm`: (experimental) This image includes additional geospatial-related extras along with PostgreSQL and PostGIS. +- `imresamu/postgis:17-3.5-bookworm`: This image includes a minimal setup of PostgreSQL with the PostGIS extension. ( debian bookworm based, easy to extend with debian packages ) +- `imresamu/postgis:17-recent-bookworm`: (experimental) Latest postgis with the latest geos,proj,gdal,sfcgal. ( debian based, extending is complex ! ) +- `imresamu/postgis:16-3.5-bundle0-bookworm`: (experimental) This image includes additional geospatial-related extras along with PostgreSQL and PostGIS. ### 🥇Debian - bookworm (recommended) - This Docker-PostGIS version has a cautious release cycle to guarantee high stability. - By "cautious", we mean it does not always have the latest versions of geos, proj, gdal, and sfcgal packages. - We use PostGIS, geos, proj, gdal, and sfcgal packages from the Debian repository. - - In the Debian Bullseye repository, the versions are: geos=3.11, gdal=3.6, proj=9.1, and sfcgal=1.4. + The versions are: geos=3.11, gdal=3.6, proj=9.1, and sfcgal=1.4. - This version is easy to extend and has matured over time. | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`12-3.4-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4-bookworm), [`12-3.4.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4.2-bookworm), [`12-3.4`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.4/bookworm/Dockerfile) | amd64 arm64 | bookworm | 12 | 3.4.2 | -| [`13-3.4-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-bookworm), [`13-3.4.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.2-bookworm), [`13-3.4`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/bookworm/Dockerfile) | amd64 arm64 | bookworm | 13 | 3.4.2 | -| [`14-3.4-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bookworm), [`14-3.4.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.2-bookworm), [`14-3.4`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/bookworm/Dockerfile) | amd64 arm64 | bookworm | 14 | 3.4.2 | -| [`15-3.4-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bookworm), [`15-3.4.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.2-bookworm), [`15-3.4`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | 3.4.2 | -| [`16-3.4-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bookworm), [`16-3.4.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.2-bookworm), [`16-3.4`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4), [`latest`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=latest) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.4.2 | +| [`13-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5-bookworm), [`13-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.3-bookworm), [`13-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 13 | 3.5.3 | +| [`14-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5-bookworm), [`14-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.3-bookworm), [`14-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 14 | 3.5.3 | +| [`15-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5-bookworm), [`15-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.3-bookworm), [`15-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | 3.5.3 | +| [`16-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-bookworm), [`16-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.3-bookworm), [`16-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.5.3 | +| [`17-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-bookworm), [`17-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5.3-bookworm), [`17-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5), [`latest`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=latest) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17 | 3.5.3 | ### 📘Debian - bullseye @@ -87,11 +87,11 @@ For those new to PostGIS, we recommend the following image versions: | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`12-3.4-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4-bullseye), [`12-3.4.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.4/bullseye/Dockerfile) | amd64 arm64 | bullseye | 12 | 3.4.2 | -| [`13-3.4-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-bullseye), [`13-3.4.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/bullseye/Dockerfile) | amd64 arm64 | bullseye | 13 | 3.4.2 | -| [`14-3.4-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-bullseye), [`14-3.4.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/bullseye/Dockerfile) | amd64 arm64 | bullseye | 14 | 3.4.2 | -| [`15-3.4-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bullseye), [`15-3.4.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/bullseye/Dockerfile) | amd64 arm64 | bullseye | 15 | 3.4.2 | -| [`16-3.4-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-bullseye), [`16-3.4.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/bullseye/Dockerfile) | amd64 arm64 | bullseye | 16 | 3.4.2 | +| [`13-3.5-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5-bullseye), [`13-3.5.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/bullseye/Dockerfile) | amd64 arm64 | bullseye | 13 | 3.5.2 | +| [`14-3.5-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5-bullseye), [`14-3.5.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/bullseye/Dockerfile) | amd64 arm64 | bullseye | 14 | 3.5.2 | +| [`15-3.5-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5-bullseye), [`15-3.5.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/bullseye/Dockerfile) | amd64 arm64 | bullseye | 15 | 3.5.2 | +| [`16-3.5-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-bullseye), [`16-3.5.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/bullseye/Dockerfile) | amd64 arm64 | bullseye | 16 | 3.5.2 | +| [`17-3.5-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-bullseye), [`17-3.5.2-bullseye`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5.2-bullseye) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.5/bullseye/Dockerfile) | amd64 arm64 | bullseye | 17 | 3.5.2 | @@ -104,8 +104,8 @@ For those new to PostGIS, we recommend the following image versions: | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`15-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recent-bookworm), [`15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm), [`15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-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 | postgis=tags/3.4.3, geos=tags/3.13.0, proj=tags/9.5.0, gdal=tags/v3.9.2, cgal=tags/v5.6.1, sfcgal=tags/v1.5.2 | -| [`16-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-bookworm), [`16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm), [`16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm), [`16-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent), [`recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | postgis=tags/3.4.3, geos=tags/3.13.0, proj=tags/9.5.0, gdal=tags/v3.9.2, cgal=tags/v5.6.1, sfcgal=tags/v1.5.2 | +| [`16-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-bookworm), [`16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm), [`16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-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 | postgis=tags/3.5.3, geos=tags/3.13.1, proj=tags/9.6.2, gdal=tags/v3.11.1, cgal=tags/v6.0.1, sfcgal=tags/v2.1.0 | +| [`17-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-recent-bookworm), [`17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm), [`17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm), [`17-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-recent), [`recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17 | postgis=tags/3.5.3, geos=tags/3.13.1, proj=tags/9.6.2, gdal=tags/v3.11.1, cgal=tags/v6.0.1, sfcgal=tags/v2.1.0 | ### 🧪Debian Geo Bundle ( experimental ) @@ -118,47 +118,56 @@ Please note that the included package list is subject to change as we continue t | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`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.2-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.2-bundle0-bookworm), [`15-3.4-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | 3.4.2 | -| [`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.2-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.2-bundle0-bookworm), [`16-3.4-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-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/16-3.4-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.4.2 | +| [`16-3.5-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-bundle0-bookworm), [`16-3.5.3-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.3-bundle0-bookworm), [`16-3.5-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | 3.5.3 | +| [`17-3.5-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-bundle0-bookworm), [`17-3.5.3-bundle0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5.3-bundle0-bookworm), [`17-3.5-bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-bundle0), [`bundle0`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=bundle0) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.5-bundle0/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17 | 3.5.3 | -### ⛰️Alpine 3.19 based +### ⛰️Alpine 3.21 based - The base operating system is [Alpine Linux](https://alpinelinux.org/). It is designed to be small, simple, and secure, and it's based on [musl libc](https://musl.libc.org/). -- In the Alpine 3.19 version, the package versions are: geos=3.12.1, gdal=3.8.1, proj=9.3.1, and sfcgal=1.5.0 +- In the Alpine 3.21 version, the package versions are: geos=3.13, gdal=3.10, proj=9.5, and sfcgal=2.0 - PostGIS is compiled from source, making it a bit more challenging to extend. - + | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`12-3.4-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4-alpine3.19), [`12-3.4.3-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4.3-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.4/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 12 | 3.4.3 | -| [`13-3.4-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine3.19), [`13-3.4.3-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.3-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 13 | 3.4.3 | -| [`14-3.4-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine3.19), [`14-3.4.3-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.3-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 14 | 3.4.3 | -| [`15-3.4-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine3.19), [`15-3.4.3-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.3-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 15 | 3.4.3 | -| [`16-3.4-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine3.19), [`16-3.4.3-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.3-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 16 | 3.4.3 | - - -### ⛰️Alpine 3.20 based +| [`13-3.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.3-alpine3.21), [`13-3.3.8-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.3.8-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.3/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 13 | 3.3.8 | +| [`13-3.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine3.21), [`13-3.4.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.4-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 13 | 3.4.4 | +| [`13-3.5-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5-alpine3.21), [`13-3.5.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.3-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 13 | 3.5.3 | +| [`14-3.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.3-alpine3.21), [`14-3.3.8-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.3.8-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.3/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 14 | 3.3.8 | +| [`14-3.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine3.21), [`14-3.4.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.4-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 14 | 3.4.4 | +| [`14-3.5-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5-alpine3.21), [`14-3.5.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.3-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 14 | 3.5.3 | +| [`15-3.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.3-alpine3.21), [`15-3.3.8-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.3.8-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.3/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 15 | 3.3.8 | +| [`15-3.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine3.21), [`15-3.4.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.4-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 15 | 3.4.4 | +| [`15-3.5-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5-alpine3.21), [`15-3.5.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.3-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 15 | 3.5.3 | +| [`16-3.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.3-alpine3.21), [`16-3.3.8-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.3.8-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.3/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 16 | 3.3.8 | +| [`16-3.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine3.21), [`16-3.4.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.4-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 16 | 3.4.4 | +| [`16-3.5-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-alpine3.21), [`16-3.5.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.3-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 16 | 3.5.3 | +| [`17-3.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.4-alpine3.21), [`17-3.4.4-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.4.4-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.4/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 17 | 3.4.4 | +| [`17-3.5-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-alpine3.21), [`17-3.5.3-alpine3.21`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5.3-alpine3.21) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.5/alpine3.21/Dockerfile) | amd64 arm64 | alpine3.21 | 17 | 3.5.3 | + + +### ⛰️Alpine 3.22 based - The base operating system is [Alpine Linux](https://alpinelinux.org/). It is designed to be small, simple, and secure, and it's based on [musl libc](https://musl.libc.org/). -- In the Alpine 3.20 version, the package versions are: geos=3.12.1, gdal=3.9.0, proj=9.4.0, and sfcgal=1.5.1 +- In the Alpine 3.22 version, the package versions are: geos=3.13.1, gdal=3.10.2, proj=9.6.0, and sfcgal=2.0.0 - PostGIS is compiled from source, making it a bit more challenging to extend. - + | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`12-3.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.3-alpine3.20), [`12-3.3.7-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.3.7-alpine3.20), [`12-3.3-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.3-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.3/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 12 | 3.3.7 | -| [`12-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4-alpine3.20), [`12-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4.3-alpine3.20), [`12-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 12 | 3.4.3 | -| [`13-3.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.3-alpine3.20), [`13-3.3.7-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.3.7-alpine3.20), [`13-3.3-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.3-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.3/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 13 | 3.3.7 | -| [`13-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine3.20), [`13-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.3-alpine3.20), [`13-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 13 | 3.4.3 | -| [`14-3.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.3-alpine3.20), [`14-3.3.7-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.3.7-alpine3.20), [`14-3.3-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.3-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.3/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 14 | 3.3.7 | -| [`14-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine3.20), [`14-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.3-alpine3.20), [`14-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 14 | 3.4.3 | -| [`15-3.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.3-alpine3.20), [`15-3.3.7-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.3.7-alpine3.20), [`15-3.3-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.3-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.3/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 15 | 3.3.7 | -| [`15-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine3.20), [`15-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.3-alpine3.20), [`15-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 15 | 3.4.3 | -| [`16-3.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.3-alpine3.20), [`16-3.3.7-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.3.7-alpine3.20), [`16-3.3-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.3-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.3/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 16 | 3.3.7 | -| [`16-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine3.20), [`16-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.3-alpine3.20), [`16-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine), [`alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 16 | 3.4.3 | - +| [`13-3.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine3.22), [`13-3.4.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4.4-alpine3.22), [`13-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.4/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 13 | 3.4.4 | +| [`13-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5-alpine3.22), [`13-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.3-alpine3.22), [`13-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 13 | 3.5.3 | +| [`14-3.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine3.22), [`14-3.4.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4.4-alpine3.22), [`14-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.4/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 14 | 3.4.4 | +| [`14-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5-alpine3.22), [`14-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.3-alpine3.22), [`14-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 14 | 3.5.3 | +| [`15-3.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine3.22), [`15-3.4.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4.4-alpine3.22), [`15-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.4/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 15 | 3.4.4 | +| [`15-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5-alpine3.22), [`15-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.3-alpine3.22), [`15-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 15 | 3.5.3 | +| [`16-3.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine3.22), [`16-3.4.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4.4-alpine3.22), [`16-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.4/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 16 | 3.4.4 | +| [`16-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-alpine3.22), [`16-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.3-alpine3.22), [`16-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 16 | 3.5.3 | +| [`17-3.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.4-alpine3.22), [`17-3.4.4-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.4.4-alpine3.22), [`17-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.4/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 17 | 3.4.4 | +| [`17-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-alpine3.22), [`17-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5.3-alpine3.22), [`17-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.5-alpine), [`alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 17 | 3.5.3 | + ### 🧪Locked ( experimental ) @@ -174,32 +183,31 @@ Please note that the included package list is subject to change as we continue t ### 📋Test images -- We provide alpha, beta, release candidate (rc), and development (identified as ~master) versions. -- The template for the `*-master` images is updated manually, which might lead to a delay of a few weeks sometimes. -- The ~master SFCGAL version is 1.5 or higher. The cgal version is locked on the [5.6.x-branch](https://github.com/CGAL/cgal/tree/5.6.x-branch). + These experimental images are designed for testing and development purposes. They include: + + **🔬 Pre-release versions (alpha, beta, rc):** Tagged versions of upcoming PostgreSQL or PostGIS releases that are not yet stable. These use specific version tags (e.g., + `18beta1`, `3.6.0alpha1`) and provide early access to new features for testing compatibility. + + **⚙️ Development builds (`*-master`):** Built from the latest development code in the main branches of PostgreSQL, PostGIS, and all geospatial dependencies (geos, proj, gdal, + cgal, sfcgal). These represent cutting-edge functionality but may contain unstable features. + + **⚠️ Important notes:** + - Pre-release and master images may have breaking changes or bugs + - The `*-master` template is updated manually and may lag behind actual development by a few weeks + - Master builds use SFCGAL 1.5+ and CGAL locked to the [5.6.x-branch](https://github.com/CGAL/cgal/tree/5.6.x-branch) + - Use these images for testing only, not in production environments | `docker.io/imresamu/postgis:` tags | Dockerfile | Arch | OS | Postgres | PostGIS | | ---- | :-: | :-: | :-: | :-: | :-: | -| [`12-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 12 | 3.5.0rc1 | -| [`12-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.5.0rc1-alpine3.20), [`12-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=12-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/12-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 12 | 3.5.0rc1 | -| [`13-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 13 | 3.5.0rc1 | -| [`13-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.0rc1-alpine3.20), [`13-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=13-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/13-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 13 | 3.5.0rc1 | -| [`14-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 14 | 3.5.0rc1 | -| [`14-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.0rc1-alpine3.20), [`14-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=14-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/14-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 14 | 3.5.0rc1 | -| [`15-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 15 | 3.5.0rc1 | -| [`15-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.0rc1-alpine3.20), [`15-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 15 | 3.5.0rc1 | -| [`15-master-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-master-bookworm), [`15-master`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=15-master) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/15-master/bookworm/Dockerfile) | amd64 arm64 | bookworm | 15 | development: postgis, geos, proj, gdal, cgal, sfcgal | -| [`16-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 16 | 3.5.0rc1 | -| [`16-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.0rc1-alpine3.20), [`16-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 16 | 3.5.0rc1 | -| [`16-l3.5.0rc1-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-l3.5.0rc1-bookworm), [`16-l3.5.0rc1`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-l3.5.0rc1) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-l3.5.0rc1/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | null | | [`16-master-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-master-bookworm), [`16-master`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=16-master) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/16-master/bookworm/Dockerfile) | amd64 arm64 | bookworm | 16 | development: postgis, geos, proj, gdal, cgal, sfcgal | -| [`17rc1-3.4-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.4-alpine3.20), [`17rc1-3.4.3-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.4.3-alpine3.20), [`17rc1-3.4-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.4-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-3.4/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 17rc1 | 3.4.3 | -| [`17rc1-3.5.0rc1-alpine3.19`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.5.0rc1-alpine3.19) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-3.5/alpine3.19/Dockerfile) | amd64 arm64 | alpine3.19 | 17rc1 | 3.5.0rc1 | -| [`17rc1-3.5.0rc1-alpine3.20`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.5.0rc1-alpine3.20), [`17rc1-3.5.0rc1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-3.5.0rc1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-3.5/alpine3.20/Dockerfile) | amd64 arm64 | alpine3.20 | 17rc1 | 3.5.0rc1 | -| [`17rc1-l3.5.0rc1-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-l3.5.0rc1-bookworm), [`17rc1-l3.5.0rc1`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-l3.5.0rc1) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-l3.5.0rc1/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17rc1 | null | -| [`17rc1-master-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-master-bookworm), [`17rc1-master`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-master) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-master/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17rc1 | development: postgis, geos, proj, gdal, cgal, sfcgal | -| [`17rc1-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-recent-bookworm), [`17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm), [`17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm), [`17rc1-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17rc1-recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17rc1-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17rc1 | postgis=tags/3.4.3, geos=tags/3.13.0, proj=tags/9.5.0, gdal=tags/v3.9.2, cgal=tags/v5.6.1, sfcgal=tags/v1.5.2 | +| [`17-3.6.0alpha1-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.6.0alpha1-alpine3.22), [`17-3.6.0alpha1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-3.6.0alpha1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-3.6/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 17 | 3.6.0alpha1 | +| [`17-master-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-master-bookworm), [`17-master`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=17-master) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/17-master/bookworm/Dockerfile) | amd64 arm64 | bookworm | 17 | development: postgis, geos, proj, gdal, cgal, sfcgal | +| [`18beta1-3.5-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5-alpine3.22), [`18beta1-3.5.3-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5.3-alpine3.22), [`18beta1-3.5-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/18-3.5/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 18beta1 | 3.5.3 | +| [`18beta1-3.5-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5-bookworm), [`18beta1-3.5.3-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5.3-bookworm), [`18beta1-3.5`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.5) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/18-3.5/bookworm/Dockerfile) | amd64 arm64 | bookworm | 18beta1 | 3.5.3 | +| [`18beta1-3.6.0alpha1-alpine3.22`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.6.0alpha1-alpine3.22), [`18beta1-3.6.0alpha1-alpine`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-3.6.0alpha1-alpine) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/18-3.6/alpine3.22/Dockerfile) | amd64 arm64 | alpine3.22 | 18beta1 | 3.6.0alpha1 | +| [`18beta1-master-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-master-bookworm), [`18beta1-master`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-master) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/18-master/bookworm/Dockerfile) | amd64 arm64 | bookworm | 18beta1 | development: postgis, geos, proj, gdal, cgal, sfcgal | +| [`18beta1-recent-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-recent-bookworm), [`18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm), [`18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm), [`18beta1-recent`](https://registry.hub.docker.com/r/imresamu/postgis/tags?page=1&name=18beta1-recent) | [Dockerfile](https://github.com/imresamu/docker-postgis/blob/master/18-recent/bookworm/Dockerfile) | amd64 arm64 | bookworm | 18beta1 | postgis=tags/3.5.3, geos=tags/3.13.1, proj=tags/9.6.2, gdal=tags/v3.11.1, cgal=tags/v6.0.1, sfcgal=tags/v2.1.0 | ## 🚀Usage @@ -273,7 +281,7 @@ It's crucial to be aware that in a cloud environment, with default settings, the - Note that ports which are not bound to the host (i.e., `-p 5432:5432` instead of `-p 127.0.0.1:5432:5432`) will be accessible from the outside. This also applies if you configured UFW to block this specific port, as Docker manages its own iptables rules. ( [Read More](https://docs.docker.com/network/iptables/) ) -#### Recomendations: +#### Recommendations: - You can add options for using SSL ( [see postgres example](https://github.com/docker-library/postgres/issues/989#issuecomment-1222648067) ) - `-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key` diff --git a/initdb-postgis.sh b/initdb-postgis.sh deleted file mode 100644 index 21f8c373d..000000000 --- a/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2154 -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<-'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/locked.yml b/locked.yml index b2ca79f9c..f87be0b85 100644 --- a/locked.yml +++ b/locked.yml @@ -32,55 +32,3 @@ CGAL_CHECKOUT: 'tags/v5.6' CGAL_CHECKOUT_SHA1: 'de4fa0d7d57b5a997012f2804161386ff4bc0d0f' BOOST_VERSION: '1.74.0' - -'16-l3.5.0rc1': - 'bookworm': - _comment: "source: ./locked.yml" - arch: 'amd64 arm64' - BOOST_VERSION: '1.74.0' - CGAL_CHECKOUT_SHA1: '188e51bad36ffc30e49dbabda29620b71a84664c' - CGAL_CHECKOUT: 'tags/v5.6.1' - GDAL_BUILD: 'with_extra' - GDAL_CHECKOUT_SHA1: '3aae5b4cf30c958ab339157b4f8115922e2f2562' - GDAL_CHECKOUT: 'tags/v3.9.2' - GEOS_CHECKOUT_SHA1: 'd7957246c588aa9c690efe67924fd70e741a06ab' - GEOS_CHECKOUT: 'tags/3.13.0' - initfile: 'initdb-postgis.sh' - PG_DOCKER: '16' - PG_MAJOR: '16' - POSTGIS_CHECKOUT_SHA1: 'df9317741170e86ff8346decdd555b54a0432072' - POSTGIS_CHECKOUT: 'tags/3.5.0rc1' - postgis: 'l3.5.0rc1' - PROJ_CHECKOUT_SHA1: '0a407325fbb5bf42407a7dc5d4f948be9707e302' - PROJ_CHECKOUT: 'tags/9.5.0' - readme_group: 'test' - SFCGAL_CHECKOUT_SHA1: '5584600ad7ed512f158b297476f57ed5fcf9c8dc' - SFCGAL_CHECKOUT: 'tags/v1.5.2' - tags: '16-l3.5.0rc1-bookworm 16-l3.5.0rc1' - template: 'Dockerfile.master.template' - -'17rc1-l3.5.0rc1': - 'bookworm': - _comment: "source: ./locked.yml" - arch: 'amd64 arm64' - BOOST_VERSION: '1.74.0' - CGAL_CHECKOUT_SHA1: '188e51bad36ffc30e49dbabda29620b71a84664c' - CGAL_CHECKOUT: 'tags/v5.6.1' - GDAL_BUILD: 'with_extra' - GDAL_CHECKOUT_SHA1: '3aae5b4cf30c958ab339157b4f8115922e2f2562' - GDAL_CHECKOUT: 'tags/v3.9.2' - GEOS_CHECKOUT_SHA1: 'd7957246c588aa9c690efe67924fd70e741a06ab' - GEOS_CHECKOUT: 'tags/3.13.0' - initfile: 'initdb-postgis.sh' - PG_DOCKER: '17rc1' - PG_MAJOR: '17rc1' - POSTGIS_CHECKOUT_SHA1: 'df9317741170e86ff8346decdd555b54a0432072' - POSTGIS_CHECKOUT: 'tags/3.5.0rc1' - postgis: 'l3.5.0rc1' - PROJ_CHECKOUT_SHA1: '0a407325fbb5bf42407a7dc5d4f948be9707e302' - PROJ_CHECKOUT: 'tags/9.5.0' - readme_group: 'test' - SFCGAL_CHECKOUT_SHA1: '5584600ad7ed512f158b297476f57ed5fcf9c8dc' - SFCGAL_CHECKOUT: 'tags/v1.5.2' - tags: '17rc1-l3.5.0rc1-bookworm 17rc1-l3.5.0rc1' - template: 'Dockerfile.master.template' diff --git a/manifest.sh b/manifest.sh deleted file mode 100755 index c2e7b0dc2..000000000 --- a/manifest.sh +++ /dev/null @@ -1,831 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail -# Source environment variables and necessary configurations -source tools/environment_init.sh - -# -# Updating the docker manifest for the postgis image. -# This script uses the version.json metadata file as input to create the updated manifest. -# manifest-tool doc : https://github.com/estesp/manifest-tool -# -# NOTE: THIS FILE IS GENERATED VIA "./apply-manifest.sh" -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -# ----- 12-3.3-alpine3.20 ----- - -echo "manifest: ${dockername}:12-3.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.3-alpine3.20 \ - --target ${dockername}:12-3.3-alpine3.20 || true - -echo "manifest: ${dockername}:12-3.3.7-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.3.7-alpine3.20 \ - --target ${dockername}:12-3.3.7-alpine3.20 || true - -echo "manifest: ${dockername}:12-3.3-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.3-alpine \ - --target ${dockername}:12-3.3-alpine || true - -# ----- 12-3.4-alpine3.19 ----- - -echo "manifest: ${dockername}:12-3.4-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4-alpine3.19 \ - --target ${dockername}:12-3.4-alpine3.19 || true - -echo "manifest: ${dockername}:12-3.4.3-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4.3-alpine3.19 \ - --target ${dockername}:12-3.4.3-alpine3.19 || true - -# ----- 12-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:12-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4-alpine3.20 \ - --target ${dockername}:12-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:12-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4.3-alpine3.20 \ - --target ${dockername}:12-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:12-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4-alpine \ - --target ${dockername}:12-3.4-alpine || true - -# ----- 12-3.4-bookworm ----- - -echo "manifest: ${dockername}:12-3.4-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4-bookworm \ - --target ${dockername}:12-3.4-bookworm || true - -echo "manifest: ${dockername}:12-3.4.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4.2-bookworm \ - --target ${dockername}:12-3.4.2-bookworm || true - -echo "manifest: ${dockername}:12-3.4" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4 \ - --target ${dockername}:12-3.4 || true - -# ----- 12-3.4-bullseye ----- - -echo "manifest: ${dockername}:12-3.4-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4-bullseye \ - --target ${dockername}:12-3.4-bullseye || true - -echo "manifest: ${dockername}:12-3.4.2-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.4.2-bullseye \ - --target ${dockername}:12-3.4.2-bullseye || true - -# ----- 12-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:12-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.5.0rc1-alpine3.19 \ - --target ${dockername}:12-3.5.0rc1-alpine3.19 || true - -# ----- 12-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:12-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.5.0rc1-alpine3.20 \ - --target ${dockername}:12-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:12-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:12-3.5.0rc1-alpine \ - --target ${dockername}:12-3.5.0rc1-alpine || true - -# ----- 13-3.3-alpine3.20 ----- - -echo "manifest: ${dockername}:13-3.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.3-alpine3.20 \ - --target ${dockername}:13-3.3-alpine3.20 || true - -echo "manifest: ${dockername}:13-3.3.7-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.3.7-alpine3.20 \ - --target ${dockername}:13-3.3.7-alpine3.20 || true - -echo "manifest: ${dockername}:13-3.3-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.3-alpine \ - --target ${dockername}:13-3.3-alpine || true - -# ----- 13-3.4-alpine3.19 ----- - -echo "manifest: ${dockername}:13-3.4-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-alpine3.19 \ - --target ${dockername}:13-3.4-alpine3.19 || true - -echo "manifest: ${dockername}:13-3.4.3-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4.3-alpine3.19 \ - --target ${dockername}:13-3.4.3-alpine3.19 || true - -# ----- 13-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:13-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-alpine3.20 \ - --target ${dockername}:13-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:13-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4.3-alpine3.20 \ - --target ${dockername}:13-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:13-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-alpine \ - --target ${dockername}:13-3.4-alpine || true - -# ----- 13-3.4-bookworm ----- - -echo "manifest: ${dockername}:13-3.4-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-bookworm \ - --target ${dockername}:13-3.4-bookworm || true - -echo "manifest: ${dockername}:13-3.4.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4.2-bookworm \ - --target ${dockername}:13-3.4.2-bookworm || true - -echo "manifest: ${dockername}:13-3.4" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4 \ - --target ${dockername}:13-3.4 || true - -# ----- 13-3.4-bullseye ----- - -echo "manifest: ${dockername}:13-3.4-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4-bullseye \ - --target ${dockername}:13-3.4-bullseye || true - -echo "manifest: ${dockername}:13-3.4.2-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.4.2-bullseye \ - --target ${dockername}:13-3.4.2-bullseye || true - -# ----- 13-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:13-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.5.0rc1-alpine3.19 \ - --target ${dockername}:13-3.5.0rc1-alpine3.19 || true - -# ----- 13-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:13-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.5.0rc1-alpine3.20 \ - --target ${dockername}:13-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:13-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:13-3.5.0rc1-alpine \ - --target ${dockername}:13-3.5.0rc1-alpine || true - -# ----- 14-3.3-alpine3.20 ----- - -echo "manifest: ${dockername}:14-3.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.3-alpine3.20 \ - --target ${dockername}:14-3.3-alpine3.20 || true - -echo "manifest: ${dockername}:14-3.3.7-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.3.7-alpine3.20 \ - --target ${dockername}:14-3.3.7-alpine3.20 || true - -echo "manifest: ${dockername}:14-3.3-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.3-alpine \ - --target ${dockername}:14-3.3-alpine || true - -# ----- 14-3.4-alpine3.19 ----- - -echo "manifest: ${dockername}:14-3.4-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-alpine3.19 \ - --target ${dockername}:14-3.4-alpine3.19 || true - -echo "manifest: ${dockername}:14-3.4.3-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4.3-alpine3.19 \ - --target ${dockername}:14-3.4.3-alpine3.19 || true - -# ----- 14-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:14-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-alpine3.20 \ - --target ${dockername}:14-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:14-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4.3-alpine3.20 \ - --target ${dockername}:14-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:14-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-alpine \ - --target ${dockername}:14-3.4-alpine || true - -# ----- 14-3.4-bookworm ----- - -echo "manifest: ${dockername}:14-3.4-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-bookworm \ - --target ${dockername}:14-3.4-bookworm || true - -echo "manifest: ${dockername}:14-3.4.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4.2-bookworm \ - --target ${dockername}:14-3.4.2-bookworm || true - -echo "manifest: ${dockername}:14-3.4" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4 \ - --target ${dockername}:14-3.4 || true - -# ----- 14-3.4-bullseye ----- - -echo "manifest: ${dockername}:14-3.4-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4-bullseye \ - --target ${dockername}:14-3.4-bullseye || true - -echo "manifest: ${dockername}:14-3.4.2-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.4.2-bullseye \ - --target ${dockername}:14-3.4.2-bullseye || true - -# ----- 14-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:14-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.5.0rc1-alpine3.19 \ - --target ${dockername}:14-3.5.0rc1-alpine3.19 || true - -# ----- 14-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:14-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.5.0rc1-alpine3.20 \ - --target ${dockername}:14-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:14-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-3.5.0rc1-alpine \ - --target ${dockername}:14-3.5.0rc1-alpine || true - -# ----- 14-l3.1.9gcp-bookworm ----- - -echo "manifest: ${dockername}:14-l3.1.9gcp-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-l3.1.9gcp-bookworm \ - --target ${dockername}:14-l3.1.9gcp-bookworm || true - -echo "manifest: ${dockername}:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm \ - --target ${dockername}:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm || true - -# ----- 15-3.3-alpine3.20 ----- - -echo "manifest: ${dockername}:15-3.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.3-alpine3.20 \ - --target ${dockername}:15-3.3-alpine3.20 || true - -echo "manifest: ${dockername}:15-3.3.7-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.3.7-alpine3.20 \ - --target ${dockername}:15-3.3.7-alpine3.20 || true - -echo "manifest: ${dockername}:15-3.3-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.3-alpine \ - --target ${dockername}:15-3.3-alpine || true - -# ----- 15-3.4-alpine3.19 ----- - -echo "manifest: ${dockername}:15-3.4-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-alpine3.19 \ - --target ${dockername}:15-3.4-alpine3.19 || true - -echo "manifest: ${dockername}:15-3.4.3-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.3-alpine3.19 \ - --target ${dockername}:15-3.4.3-alpine3.19 || true - -# ----- 15-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:15-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-alpine3.20 \ - --target ${dockername}:15-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:15-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.3-alpine3.20 \ - --target ${dockername}:15-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:15-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-alpine \ - --target ${dockername}:15-3.4-alpine || true - -# ----- 15-3.4-bookworm ----- - -echo "manifest: ${dockername}:15-3.4-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-bookworm \ - --target ${dockername}:15-3.4-bookworm || true - -echo "manifest: ${dockername}:15-3.4.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.2-bookworm \ - --target ${dockername}:15-3.4.2-bookworm || true - -echo "manifest: ${dockername}:15-3.4" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4 \ - --target ${dockername}:15-3.4 || true - -# ----- 15-3.4-bullseye ----- - -echo "manifest: ${dockername}:15-3.4-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-bullseye \ - --target ${dockername}:15-3.4-bullseye || true - -echo "manifest: ${dockername}:15-3.4.2-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.2-bullseye \ - --target ${dockername}:15-3.4.2-bullseye || true - -# ----- 15-3.4-bundle0-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-bundle0-bookworm \ - --target ${dockername}:15-3.4-bundle0-bookworm || true - -echo "manifest: ${dockername}:15-3.4.2-bundle0-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4.2-bundle0-bookworm \ - --target ${dockername}:15-3.4.2-bundle0-bookworm || true - -echo "manifest: ${dockername}:15-3.4-bundle0" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.4-bundle0 \ - --target ${dockername}:15-3.4-bundle0 || true - -# ----- 15-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:15-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.5.0rc1-alpine3.19 \ - --target ${dockername}:15-3.5.0rc1-alpine3.19 || true - -# ----- 15-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:15-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.5.0rc1-alpine3.20 \ - --target ${dockername}:15-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:15-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-3.5.0rc1-alpine \ - --target ${dockername}:15-3.5.0rc1-alpine || true - -# ----- 15-master-bookworm ----- - -echo "manifest: ${dockername}:15-master-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-master-bookworm \ - --target ${dockername}:15-master-bookworm || true - -echo "manifest: ${dockername}:15-master" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-master \ - --target ${dockername}:15-master || true - -# ----- 15-recent-bookworm ----- - -echo "manifest: ${dockername}:15-recent-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recent-bookworm \ - --target ${dockername}:15-recent-bookworm || true - -echo "manifest: ${dockername}:15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm \ - --target ${dockername}:15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm || true - -echo "manifest: ${dockername}:15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm \ - --target ${dockername}:15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm || true - -echo "manifest: ${dockername}:15-recent" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:15-recent \ - --target ${dockername}:15-recent || true - -# ----- 16-3.3-alpine3.20 ----- - -echo "manifest: ${dockername}:16-3.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.3-alpine3.20 \ - --target ${dockername}:16-3.3-alpine3.20 || true - -echo "manifest: ${dockername}:16-3.3.7-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.3.7-alpine3.20 \ - --target ${dockername}:16-3.3.7-alpine3.20 || true - -echo "manifest: ${dockername}:16-3.3-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.3-alpine \ - --target ${dockername}:16-3.3-alpine || true - -# ----- 16-3.4-alpine3.19 ----- - -echo "manifest: ${dockername}:16-3.4-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-alpine3.19 \ - --target ${dockername}:16-3.4-alpine3.19 || true - -echo "manifest: ${dockername}:16-3.4.3-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.3-alpine3.19 \ - --target ${dockername}:16-3.4.3-alpine3.19 || true - -# ----- 16-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:16-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-alpine3.20 \ - --target ${dockername}:16-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:16-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.3-alpine3.20 \ - --target ${dockername}:16-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:16-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-alpine \ - --target ${dockername}:16-3.4-alpine || true - -echo "manifest: ${dockername}:alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:alpine \ - --target ${dockername}:alpine || true - -# ----- 16-3.4-bookworm ----- - -echo "manifest: ${dockername}:16-3.4-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-bookworm \ - --target ${dockername}:16-3.4-bookworm || true - -echo "manifest: ${dockername}:16-3.4.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.2-bookworm \ - --target ${dockername}:16-3.4.2-bookworm || true - -echo "manifest: ${dockername}:16-3.4" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4 \ - --target ${dockername}:16-3.4 || true - -echo "manifest: ${dockername}:latest" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:latest \ - --target ${dockername}:latest || true - -# ----- 16-3.4-bullseye ----- - -echo "manifest: ${dockername}:16-3.4-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-bullseye \ - --target ${dockername}:16-3.4-bullseye || true - -echo "manifest: ${dockername}:16-3.4.2-bullseye" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.2-bullseye \ - --target ${dockername}:16-3.4.2-bullseye || true - -# ----- 16-3.4-bundle0-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-bundle0-bookworm \ - --target ${dockername}:16-3.4-bundle0-bookworm || true - -echo "manifest: ${dockername}:16-3.4.2-bundle0-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4.2-bundle0-bookworm \ - --target ${dockername}:16-3.4.2-bundle0-bookworm || true - -echo "manifest: ${dockername}:16-3.4-bundle0" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.4-bundle0 \ - --target ${dockername}:16-3.4-bundle0 || true - -echo "manifest: ${dockername}:bundle0" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:bundle0 \ - --target ${dockername}:bundle0 || true - -# ----- 16-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:16-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.5.0rc1-alpine3.19 \ - --target ${dockername}:16-3.5.0rc1-alpine3.19 || true - -# ----- 16-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:16-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.5.0rc1-alpine3.20 \ - --target ${dockername}:16-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:16-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-3.5.0rc1-alpine \ - --target ${dockername}:16-3.5.0rc1-alpine || true - -# ----- 16-l3.5.0rc1-bookworm ----- - -echo "manifest: ${dockername}:16-l3.5.0rc1-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-l3.5.0rc1-bookworm \ - --target ${dockername}:16-l3.5.0rc1-bookworm || true - -echo "manifest: ${dockername}:16-l3.5.0rc1" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-l3.5.0rc1 \ - --target ${dockername}:16-l3.5.0rc1 || true - -# ----- 16-master-bookworm ----- - -echo "manifest: ${dockername}:16-master-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-master-bookworm \ - --target ${dockername}:16-master-bookworm || true - -echo "manifest: ${dockername}:16-master" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-master \ - --target ${dockername}:16-master || true - -# ----- 16-recent-bookworm ----- - -echo "manifest: ${dockername}:16-recent-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recent-bookworm \ - --target ${dockername}:16-recent-bookworm || true - -echo "manifest: ${dockername}:16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm \ - --target ${dockername}:16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm || true - -echo "manifest: ${dockername}:16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm \ - --target ${dockername}:16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm || true - -echo "manifest: ${dockername}:16-recent" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:16-recent \ - --target ${dockername}:16-recent || true - -echo "manifest: ${dockername}:recent" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:recent \ - --target ${dockername}:recent || true - -# ----- 17rc1-3.4-alpine3.20 ----- - -echo "manifest: ${dockername}:17rc1-3.4-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.4-alpine3.20 \ - --target ${dockername}:17rc1-3.4-alpine3.20 || true - -echo "manifest: ${dockername}:17rc1-3.4.3-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.4.3-alpine3.20 \ - --target ${dockername}:17rc1-3.4.3-alpine3.20 || true - -echo "manifest: ${dockername}:17rc1-3.4-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.4-alpine \ - --target ${dockername}:17rc1-3.4-alpine || true - -# ----- 17rc1-3.5-alpine3.19 ----- - -echo "manifest: ${dockername}:17rc1-3.5.0rc1-alpine3.19" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.5.0rc1-alpine3.19 \ - --target ${dockername}:17rc1-3.5.0rc1-alpine3.19 || true - -# ----- 17rc1-3.5-alpine3.20 ----- - -echo "manifest: ${dockername}:17rc1-3.5.0rc1-alpine3.20" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.5.0rc1-alpine3.20 \ - --target ${dockername}:17rc1-3.5.0rc1-alpine3.20 || true - -echo "manifest: ${dockername}:17rc1-3.5.0rc1-alpine" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-3.5.0rc1-alpine \ - --target ${dockername}:17rc1-3.5.0rc1-alpine || true - -# ----- 17rc1-l3.5.0rc1-bookworm ----- - -echo "manifest: ${dockername}:17rc1-l3.5.0rc1-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-l3.5.0rc1-bookworm \ - --target ${dockername}:17rc1-l3.5.0rc1-bookworm || true - -echo "manifest: ${dockername}:17rc1-l3.5.0rc1" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-l3.5.0rc1 \ - --target ${dockername}:17rc1-l3.5.0rc1 || true - -# ----- 17rc1-master-bookworm ----- - -echo "manifest: ${dockername}:17rc1-master-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-master-bookworm \ - --target ${dockername}:17rc1-master-bookworm || true - -echo "manifest: ${dockername}:17rc1-master" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-master \ - --target ${dockername}:17rc1-master || true - -# ----- 17rc1-recent-bookworm ----- - -echo "manifest: ${dockername}:17rc1-recent-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-recent-bookworm \ - --target ${dockername}:17rc1-recent-bookworm || true - -echo "manifest: ${dockername}:17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm \ - --target ${dockername}:17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm || true - -echo "manifest: ${dockername}:17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm \ - --target ${dockername}:17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm || true - -echo "manifest: ${dockername}:17rc1-recent" -manifest-tool push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template ${dockername}-ARCHVARIANT:17rc1-recent \ - --target ${dockername}:17rc1-recent || true diff --git a/templates/Dockerfile.alpine.template b/templates/Dockerfile.alpine.template new file mode 100644 index 000000000..c54b65184 --- /dev/null +++ b/templates/Dockerfile.alpine.template @@ -0,0 +1,217 @@ + +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 }} + +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGIS_REPOSITORY +ARG PGIS1_POSTGIS_CHECKOUT +ARG PGIS1_POSTGIS_CHECKOUT_SHA1 +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="{{ .[env.variant].POSTGIS_VERSION }}" \ + org.opencontainers.image.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_CHECKOUT} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="{{ .[env.variant].POSTGIS_VERSION }}" \ + org.postgis.base.revision="${PGIS1_POSTGIS_CHECKOUT_SHA1}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.base.source.repository="${PGIS1_POSTGIS_REPOSITORY}" + + +RUN set -eux \ + # Update package cache first + && apk update \ + # Get exact versions of available packages + && GDAL_VERSION=$(apk list --available gdal-dev | grep 'gdal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && GEOS_VERSION=$(apk list --available geos-dev | grep 'geos-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROJ_VERSION=$(apk list --available proj-dev | grep 'proj-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && SFCGAL_VERSION=$(apk list --available sfcgal-dev | grep 'sfcgal-dev-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && JSON_C_VERSION=$(apk list --available json-c | grep 'json-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PROTOBUF_C_VERSION=$(apk list --available protobuf-c | grep 'protobuf-c-' | head -1 | awk '{print $1}' | cut -d'-' -f3-) \ + && PCRE_VERSION=$(apk list --available pcre | grep '^pcre-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + && PERL_VERSION=$(apk list --available perl | grep '^perl-' | head -1 | awk '{print $1}' | cut -d'-' -f2-) \ + \ + # Export build environment for child images ( see example in the end of this file ) + && echo "export GDAL_VERSION=${GDAL_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export GEOS_VERSION=${GEOS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROJ_VERSION=${PROJ_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export SFCGAL_VERSION=${SFCGAL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export JSON_C_VERSION=${JSON_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PROTOBUF_C_VERSION=${PROTOBUF_C_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PCRE_VERSION=${PCRE_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PERL_VERSION=${PERL_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apk add --no-cache --virtual .build-deps \ + ca-certificates \ + gdal-dev=${GDAL_VERSION} \ + geos-dev=${GEOS_VERSION} \ + proj-dev=${PROJ_VERSION} \ + proj-util=${PROJ_VERSION} \ + sfcgal-dev=${SFCGAL_VERSION} \ + \ + # The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains + # the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL. + # This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077 + $DOCKER_PG_LLVM_DEPS \ + \ + autoconf \ + automake \ + bison \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + libxml2-utils \ + make \ + # Note: PCRE2 is not supported in older versions of PostGIS. + # To ensure compatibility with PostGIS version 3.0, PCRE 1 is required. + # If PCRE2 support is needed, please submit an issue on the docker-postgis GitHub repository. + pcre-dev \ + perl \ + protobuf-c-dev \ + \ + # postgis + && cd /usr/src \ + && mkdir postgis \ + && cd postgis \ + && git init \ + && 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)" != "$PGIS1_POSTGIS_CHECKOUT_SHA1" ]; then \ + echo "ERROR: SHA1 mismatch. Expected: $PGIS1_POSTGIS_CHECKOUT_SHA1, Got: $(git rev-parse HEAD)"; \ + exit 1; \ + fi \ + && git log -1 > /_pgis_last_commit.txt \ + # build PostGIS - with Link Time Optimization (LTO) enabled + && cd /usr/src/postgis \ + && gettextize \ + && ./autogen.sh \ + && ./configure \ + --enable-lto \ + --with-optimization-flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + --disable-debug \ + && make -j$(nproc) \ + && make install \ + \ + # This section is for refreshing the proj data for the regression tests. + # It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316 + # This increases the Docker image size by about 1 MB. + && projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \ + && projsync --system-directory --file us_noaa_eshpgn \ + && projsync --system-directory --file us_noaa_prvi \ + && projsync --system-directory --file us_noaa_wmhpgn \ + # This section performs a regression check. + && mkdir /tempdb \ + && chown -R postgres:postgres /tempdb \ + && su postgres -c 'pg_ctl -D /tempdb init' \ + && su postgres -c 'pg_ctl -D /tempdb -c -l /tmp/logfile -o '-F' start ' \ + && cd regress \ + && make -j$(nproc) check RUNTESTFLAGS="--extension --verbose" PGUSER=postgres \ + \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \ + && su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \ + && su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \ + && su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \ + \ + && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \ + && rm -rf /tempdb \ + && rm -rf /tmp/logfile \ + && rm -rf /tmp/pgis_reg \ + # add .postgis-rundeps + && apk add --no-cache --virtual .postgis-rundeps \ + gdal=${GDAL_VERSION} \ + geos=${GEOS_VERSION} \ + proj=${PROJ_VERSION} \ + sfcgal=${SFCGAL_VERSION} \ + json-c=${JSON_C_VERSION} \ + protobuf-c=${PROTOBUF_C_VERSION} \ + pcre=${PCRE_VERSION} \ + # for postgis_restore.pl ; ref: https://github.com/postgis/docker-postgis/issues/373 + perl=${PERL_VERSION} \ + # no locking, system componenets + libstdc++ \ + # ca-certificates: for accessing remote raster files ; need the latest, no locking + # fix https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + # clean + && cd / \ + && rm -rf \ + /usr/src/postgis \ + /usr/local/share/doc \ + /usr/local/share/man \ + && apk del .build-deps \ + # Add system package versions to version report + && apk list --installed | grep -E "(geos|proj|gdal|sfcgal)" >> /_pgis_full_version.txt \ + && echo "Optimization flags: ${PGIS1_OPTIMIZATION_FLAGS}" >> /_pgis_full_version.txt \ + # 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 + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin + + +# Draft child image example ( pgrouting ) +#======================================================== +# FROM postgis/postgis:17-3.5-alpine3.22 +# LABEL \ +# # overwrite all org.opencontainers - labels +# maintainer="pgrouting maintainers" \ +# org.opencontainers.image.description="PostGIS with pgrouting" \ +# org.opencontainers.image.source="..." \ +# org.opencontainers.image.version="..." \ +# org.opencontainers.image.revision="..." \ +# org.opencontainers.image.created="..." \ +# org.opencontainers.image.base.name="postgis/postgis:17-3.5-alpine3.22" \ +# # add your org labels +# org.pgrouting.base.maintainer="..." \ +# org.pgrouting.base.optimization="...." +# +# # Install development packages with same versions +# RUN source /usr/local/share/docker-postgis-env.sh \ +# && apk add --no-cache --virtual .pgrouting-build-deps \ +# gdal-dev=${GDAL_VERSION} \ +# geos-dev=${GEOS_VERSION} \ +# $DOCKER_PG_LLVM_DEPS \ +# cmake \ +# boost-dev \ +# g++ \ +# gcc +# .... diff --git a/Dockerfile.bundle0.template b/templates/Dockerfile.bundle0.template similarity index 60% rename from Dockerfile.bundle0.template rename to templates/Dockerfile.bundle0.template index 3f8bccd0a..2f299df92 100644 --- a/Dockerfile.bundle0.template +++ b/templates/Dockerfile.bundle0.template @@ -1,5 +1,4 @@ - # 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. @@ -13,32 +12,25 @@ ARG IMAGE_NAME={{ env.IMAGE_NAME }} ARG PGIS1_BASE_IMAGE=${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} -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 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 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 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 }} - 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 }} ARG PGIS1_DUCKDB_CHECKOUT={{ .[env.variant].DUCKDB_CHECKOUT }} +# usable for forking the image +ARG PGIS1_OPTIMIZATION_FLAGS=" -O3 -mtune=generic " +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + FROM ${PGIS1_BASE_IMAGE} AS builder ARG PGIS1_DUCKDB_CHECKOUT +ARG PGIS1_OPTIMIZATION_FLAGS RUN set -eux \ && apt-get update \ @@ -50,6 +42,7 @@ RUN set -eux \ build-essential \ cmake \ curl \ + flex \ g++ \ git \ make \ @@ -57,36 +50,20 @@ RUN set -eux \ 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 \ - # hydra (columnar) - liblz4-dev \ # pgsql-gzip zlib1g-dev \ # sqlite_fdw sqlite3 \ - # plv8 - ninja-build \ - pkg-config \ # bytemagic libmagic-dev \ # pgsoudium \ libsodium-dev \ + # pg_curl + libcurl4-gnutls-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -FROM builder as builder-http-gzip - -ARG PGIS1_PGSQL_HTTP_REPOSITORY -ARG PGIS1_PGSQL_HTTP_CHECKOUT -ARG PGIS1_PGSQL_HTTP_CHECKOUT_SHA1 +FROM builder as builder-gzip ARG PGIS1_PGSQL_GZIP_REPOSITORY ARG PGIS1_PGSQL_GZIP_CHECKOUT @@ -105,79 +82,6 @@ RUN set -eux \ && make -j$(nproc) \ && make install -RUN set -eux \ - && mkdir -p /pgsql-http \ - && cd pgsql-http \ - && git init \ - && 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)" != "$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 -eux \ - && mkdir -p /timescaledb \ - && cd timescaledb \ - && git init \ - && 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)" != "$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=${PGIS1_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 - -FROM builder as builder-mobilitydb - -ARG PGIS1_MOBILITYDB_REPOSITORY -ARG PGIS1_MOBILITYDB_CHECKOUT -ARG PGIS1_MOBILITYDB_CHECKOUT_SHA1 - -# Install MobilityDB -RUN set -eux \ - && mkdir -p /MobilityDB \ - && cd MobilityDB \ - && git init \ - && 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)" != "$PGIS1_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 - FROM builder as builder-pgxn @@ -186,8 +90,6 @@ RUN pgxn install --verbose ddlx RUN pgxn install --verbose dsef RUN pgxn install --verbose json_accessors RUN pgxn install --verbose lostgis - -#RUN pgxn install --verbose parray_gin # not working on CircleCI arm .. yet RUN pgxn install --verbose permuteseq RUN pgxn install --verbose pg_curl # https://github.com/RekGRpth/pg_curl RUN pgxn install --verbose pg_roaringbitmap @@ -197,7 +99,23 @@ RUN pgxn install --verbose pg_xenophile RUN pgxn install --verbose pg_xxhash RUN pgxn install --verbose pgsodium RUN pgxn install --verbose pgsql_tweaks -RUN USE_PGXS=1 pgxn install sqlite_fdw +# RUN pgxn install --verbose sqlite_fdw + +{{ if env.version | startswith("17") then ( -}} +# pgxman pg_duckdb is not available / not working for PG17 yet +{{ ) else ( -}} +# pg_duckdb +RUN set -eux \ + && curl -sfL https://install.pgx.sh -o /tmp/pgx-install.sh \ + && chmod +x /tmp/pgx-install.sh \ + && /tmp/pgx-install.sh \ + && rm /tmp/pgx-install.sh +RUN pgxman install pg_duckdb +{{ ) end -}} + +#RUN pgxman install hydra_columnar +#RUN pgxman install pgvectorscale +#RUN pgxman install pg_quack FROM builder as builder-other @@ -205,30 +123,6 @@ ARG PGIS1_PG_HINT_PLAN_REPOSITORY ARG PGIS1_PG_HINT_PLAN_CHECKOUT ARG PGIS1_PG_HINT_PLAN_CHECKOUT_SHA1 -# Add hydradatabase -# TODO hydradatabase version! -RUN set -eux \ - && git clone --depth 1 https://github.com/hydradatabase/hydra \ - && cd hydra/columnar \ - && git checkout main \ - && export COLUMNAR_O3=1 \ - && ./configure \ - && make -j$(nproc) \ - && make install - -# {{ if env.version | startswith("16") then ( -}} -# # pg_quack is not available for PG16 -# # - https://github.com/hydradatabase/pg_quack/issues/3 -# {{ ) else ( -}} -# # add pg_quack: PG 14 and PG 15 only (PG 16 is not yet supported) -# # TODO: add pg_quack version! -# RUN set -eux \ -# && git clone --depth 1 https://github.com/hydradatabase/pg_quack \ -# && cd pg_quack \ -# && make -j$(nproc) \ -# && make install -# {{ ) end -}} - # install pg_hint_plan RUN set -eux \ && mkdir pg_hint_plan \ @@ -255,9 +149,45 @@ RUN set -eux \ FROM ${REGISTRY}/${REPO_NAME}/${IMAGE_NAME}:{{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS Bundle - {{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} " \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" +ARG PGIS1_OPTIMIZATION_FLAGS +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_TIMESCALEDB_TELEMETRY + +# Export build environment for child images (enterprise-grade package version locking) +RUN set -eux \ + # Ensure docker-postgis-env.sh exists (create empty if missing) + && touch /usr/local/share/docker-postgis-env.sh \ + # Export bundle-specific build versions for child images + && echo "# Bundle0 Extension Versions" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_OPTIMIZATION_FLAGS='${PGIS1_OPTIMIZATION_FLAGS}'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PG_HINT_PLAN_CHECKOUT='{{ .[env.variant].PG_HINT_PLAN_CHECKOUT }}'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_DUCKDB_CHECKOUT='{{ .[env.variant].DUCKDB_CHECKOUT }}'" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_PGSQL_GZIP_CHECKOUT='{{ .[env.variant].PGSQL_GZIP_CHECKOUT }}'" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + # Source the environment after populating it + && . /usr/local/share/docker-postgis-env.sh + +# Only override opencontainers labels for bundle-specific info +# org.postgis.base.* labels are inherited from base image and should NOT be overridden +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS Bundle - {{ .[env.variant].PG_DOCKER }}-{{ .[env.variant].postgis }}-{{ env.variant }} with MobilityDB, TimescaleDB, DuckDB and 40+ extensions" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="{{ .[env.variant].POSTGIS_VERSION }}-bundle0" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # Bundle-specific additional extensions (base PostGIS extensions inherited from org.postgis.base.extensions) +{{ if env.version | startswith("17") then ( -}} + org.postgis.bundle0.additional.extensions="timescaledb,mobilitydb,pgsql_http,pgsql_gzip,pgrouting,pgvector,h3,pointcloud,pgaudit,byteamagic,ddlx,dsef,json_accessors,lostgis,permuteseq,pg_curl,pg_roaringbitmap,pg_rowalesce,pg_uuidv7,pg_xenophile,pg_xxhash,pgsodium,pgsql_tweaks,asn1oid,extra_window_functions,first_last_agg,hll,hypopg,icu_ext,jsquery,numeral,ogr_fdw,partman,periods,pg_fact_loader,pg_failover_slots,pg_stat_kcache,pg_wait_sampling,pgl_ddl_deploy,pglogical,pgmp,pgpcre,pgq3,pgsphere,pgtap,pldebugger,plpgsql_check,prefix,prioritize,q3c,repack,rum,show_plans,squeeze" \ + org.postgis.bundle0.excluded.pg17="sqlite_fdw,age,decoderbufs" \ +{{ ) else ( -}} + org.postgis.bundle0.additional.extensions="timescaledb,mobilitydb,pgsql_http,pgsql_gzip,pgrouting,pgvector,h3,pointcloud,pgaudit,byteamagic,ddlx,dsef,json_accessors,lostgis,permuteseq,pg_curl,pg_roaringbitmap,pg_rowalesce,pg_uuidv7,pg_xenophile,pg_xxhash,pgsodium,pgsql_tweaks,sqlite_fdw,age,decoderbufs,asn1oid,extra_window_functions,first_last_agg,hll,hypopg,icu_ext,jsquery,numeral,ogr_fdw,partman,periods,pg_fact_loader,pg_failover_slots,pg_stat_kcache,pg_wait_sampling,pgl_ddl_deploy,pglogical,pgmp,pgpcre,pgq3,pgsphere,pgtap,pldebugger,plpgsql_check,prefix,prioritize,q3c,repack,rum,show_plans,squeeze" \ +{{ ) end -}} + org.postgis.bundle0.permanently.excluded="parray_gin,pg_quack" \ + org.postgis.bundle0.optimization.flags="${PGIS1_OPTIMIZATION_FLAGS}" \ + org.postgis.bundle0.timescaledb.telemetry="${PGIS1_TIMESCALEDB_TELEMETRY}" \ + org.postgis.bundle0.duckdb.version="{{ .[env.variant].DUCKDB_CHECKOUT }}" # install all utf8 locales; # helping: https://github.com/docker-library/docs/tree/master/postgres#locale-customization @@ -305,18 +235,29 @@ RUN set -eux \ pgtop \ pspg \ vip-manager \ + \ + # add any exceptions for PG17 or PPG16 here +{{ if env.version | startswith("17") then ( -}} + # PostgreSQL 17 specific packages +{{ ) else ( -}} + # PostgreSQL 16 and earlier packages +{{ ) end -}} \ postgresql-$PG_MAJOR-age \ postgresql-$PG_MAJOR-asn1oid \ + postgresql-$PG_MAJOR-auto-failover \ + postgresql-$PG_MAJOR-credcheck \ postgresql-$PG_MAJOR-cron \ postgresql-$PG_MAJOR-decoderbufs \ postgresql-$PG_MAJOR-extra-window-functions \ postgresql-$PG_MAJOR-first-last-agg \ postgresql-$PG_MAJOR-h3 \ postgresql-$PG_MAJOR-hll \ + postgresql-$PG_MAJOR-http \ postgresql-$PG_MAJOR-hypopg \ postgresql-$PG_MAJOR-icu-ext \ postgresql-$PG_MAJOR-jsquery \ + postgresql-$PG_MAJOR-mobilitydb \ postgresql-$PG_MAJOR-numeral \ postgresql-$PG_MAJOR-ogr-fdw \ postgresql-$PG_MAJOR-partman \ @@ -346,8 +287,7 @@ RUN set -eux \ postgresql-$PG_MAJOR-rum \ postgresql-$PG_MAJOR-show-plans \ postgresql-$PG_MAJOR-squeeze \ - # add MobilityDb missing dependency from libgsl-dev - libgsl27 \ + postgresql-$PG_MAJOR-timescaledb \ # MeCab based tokenizer for pgdg-pgroonga groonga-tokenizer-mecab \ # bytemagic @@ -362,40 +302,42 @@ RUN set -eux \ ARG PGIS1_DUCKDB_CHECKOUT ENV PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT} RUN arch=$(uname -m) \ - && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed 's/tags\///') \ + && DUCKDB_VERSION=$(echo "$PGIS1_DUCKDB_CHECKOUT" | sed -E 's|^.*/||; s|^tags/||; s|^v||') \ && echo "DUCKDB_VERSION=${DUCKDB_VERSION}" \ && echo "PGIS1_DUCKDB_CHECKOUT=${PGIS1_DUCKDB_CHECKOUT}" \ && case "$arch" in \ x86_64) \ duck_binary="duckdb_cli-linux-amd64.zip" ;; \ aarch64) \ - duck_binary="duckdb_cli-linux-aarch64.zip" ;; \ + duck_binary="duckdb_cli-linux-arm64.zip" ;; \ *) \ echo "Unsupported architecture: $arch"; exit 1 ;; \ esac \ - && wget https://github.com/duckdb/duckdb/releases/download/${DUCKDB_VERSION}/$duck_binary \ + && wget https://github.com/duckdb/duckdb/releases/download/v${DUCKDB_VERSION}/$duck_binary \ && unzip $duck_binary -d /usr/local/bin \ && rm $duck_binary \ && duckdb --version -# install extensions -# https://duckdb.org/docs/extensions/overview.html -ENV DUCKDB_EXTENSIONS="arrow autocomplete excel fts httpfs icu inet json parquet postgres_scanner spatial sqlite_scanner substrait tpcds tpch visualizer" +# install duckdb extensions +ENV DUCKDB_EXTENSIONS="excel fts httpfs inet postgres_scanner spatial sqlite_scanner tpcds tpch" RUN for e in ${DUCKDB_EXTENSIONS} ; do \ echo "Installing $e ..."; \ - duckdb -c "INSTALL $e;"; \ - echo "LOAD $e;" >> $HOME/.duckdbrc; \ - done + if duckdb -c "INSTALL $e;" 2>&1 | tee /tmp/duckdb-install-$e.log; then \ + echo "Successfully installed $e"; \ + echo "LOAD $e;" >> $HOME/.duckdbrc; \ + else \ + echo "Failed to install $e, check /tmp/duckdb-install-$e.log"; \ + fi; \ + done \ + # Add core extensions to .duckdbrc (these are built-in) + && echo "LOAD autocomplete;" >> $HOME/.duckdbrc \ + && echo "LOAD icu;" >> $HOME/.duckdbrc \ + && echo "LOAD json;" >> $HOME/.duckdbrc \ + && echo "LOAD parquet;" >> $HOME/.duckdbrc # 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-gzip /usr/share/postgresql/$PG_MAJOR/extension/ /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=builder-gzip /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 @@ -424,7 +366,7 @@ RUN set -eux \ 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 = 'pg_hint_plan,postgis-3,timescaledb,pg_cron,pg_stat_statements'" >> /usr/share/postgresql/postgresql.conf.sample; \ + echo "shared_preload_libraries = 'postgis-3,pg_stat_statements,timescaledb'" >> /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 @@ -432,4 +374,4 @@ RUN set -eux \ # for postgres_dba Use ":dba" to see menu RUN printf "%s %s %s %s\n" \\set dba \'\\\\i /postgres_dba/start.psql\' >> ~/.psqlrc -COPY ./initdb-bundle0.sh /docker-entrypoint-initdb.d/11_bundle0.sh \ No newline at end of file +COPY ./initdb-bundle0.sh /docker-entrypoint-initdb.d/11_bundle0.sh diff --git a/templates/Dockerfile.debian.template b/templates/Dockerfile.debian.template new file mode 100644 index 000000000..1f61e9719 --- /dev/null +++ b/templates/Dockerfile.debian.template @@ -0,0 +1,88 @@ +ARG PGIS1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} +ARG PGIS1_POSTGRES_MAJOR={{ .[env.variant].PG_MAJOR }} +ARG PGIS1_POSTGIS_VERSION={{ .[env.variant].POSTGIS_VERSION }} +ARG PGIS1_POSTGIS_MAJOR={{ .[env.variant].POSTGIS_MAJOR }} + +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + +FROM ${PGIS1_BASE_IMAGE} + +ARG PGIS1_POSTGRES_MAJOR +ARG PGIS1_POSTGIS_VERSION +ARG PGIS1_POSTGIS_MAJOR +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ + org.opencontainers.image.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} {{ env.variant }}" \ + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="${PGIS1_POSTGIS_VERSION}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS ${PGIS1_POSTGIS_VERSION} spatial database extension with PostgreSQL ${PGIS1_POSTGRES_MAJOR} {{ env.variant }}" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="${PGIS1_POSTGIS_VERSION}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" + +ENV POSTGIS_MAJOR ${PGIS1_POSTGIS_MAJOR} +ENV POSTGIS_VERSION ${PGIS1_POSTGIS_VERSION} + +RUN set -eux \ + # Export Debian package environment for child images + && apt-get update \ + && POSTGIS_PACKAGE_VERSION=$(apt-cache madison postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR | head -1 | awk '{print $3}') \ + && echo "export POSTGIS_PACKAGE_VERSION=${POSTGIS_PACKAGE_VERSION}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PG_MAJOR=${PG_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_MAJOR=${POSTGIS_MAJOR}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export POSTGIS_VERSION=${POSTGIS_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + # ca-certificates: for accessing remote raster files; + # fix: https://github.com/postgis/docker-postgis/issues/307 + ca-certificates \ + \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ + postgis \ + && rm -rf /var/lib/apt/lists/* + +# multiple LLVM existance is not allowed. +RUN set -eux \ + && dpkg -l | grep llvm \ + && llvm_count=$(dpkg -l | grep llvm | wc -l) \ + && if [ "$llvm_count" -ne 1 ]; then \ + echo "ERROR: Expected exactly 1 LLVM package, found $llvm_count. This may cause PostGIS compilation issues."; \ + echo "Installed LLVM packages:"; \ + dpkg -l | grep llvm; \ + exit 1; \ + fi \ + # Add installed package versions to environment export + && dpkg -l | grep -E "(libgeos|libproj|libgdal|postgis)" | awk '{gsub(/[:.+-]/, "_", $2); print "export " $2 "=\"" $3 "\""}' >> /usr/local/share/docker-postgis-env.sh \ + && echo "# LLVM validation: passed (exactly 1 LLVM package found)" >> /usr/local/share/docker-postgis-env.sh \ + # Debug: show the generated environment file + && echo "=== Generated docker-postgis-env.sh content ===" \ + && cat /usr/local/share/docker-postgis-env.sh \ + && echo "=== End of docker-postgis-env.sh ===" \ + # Test the generated environment file by sourcing it + && echo "=== Testing docker-postgis-env.sh sourcing ===" \ + && . /usr/local/share/docker-postgis-env.sh \ + && echo "Successfully sourced docker-postgis-env.sh" \ + && echo "POSTGIS_PACKAGE_VERSION: ${POSTGIS_PACKAGE_VERSION}" \ + && echo "PG_MAJOR: ${PG_MAJOR}" \ + && echo "POSTGIS_MAJOR: ${POSTGIS_MAJOR}" \ + && echo "POSTGIS_VERSION: ${POSTGIS_VERSION}" \ + && echo "=== docker-postgis-env.sh test completed ===" + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/Dockerfile.master.template b/templates/Dockerfile.master.template similarity index 87% rename from Dockerfile.master.template rename to templates/Dockerfile.master.template index 7fd3220bd..dc45062b0 100644 --- a/Dockerfile.master.template +++ b/templates/Dockerfile.master.template @@ -3,6 +3,10 @@ ARG PGIS1_BASE_IMAGE=postgres:{{ .[env.variant].PG_DOCKER }}-{{ env.variant }} +# usable for forking the image +ARG PGIS1_SOURCE_REPO="https://github.com/postgis/docker-postgis" +ARG PGIS1_MAINTAINER="PostGIS Project - https://postgis.net - ${PGIS1_SOURCE_REPO}/issues" + 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 @@ -42,10 +46,19 @@ FROM ${PGIS1_BASE_IMAGE} as builder WORKDIR / ARG PGIS1_BOOST_VERSION +ARG PGIS1_CMAKE_BUILD_TYPE +ARG PGIS1_BASE_IMAGE ENV PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} # apt-get install RUN set -eux \ + # Export build environment for child images + && echo "export PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE}" > /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_BASE_IMAGE=${PGIS1_BASE_IMAGE}" >> /usr/local/share/docker-postgis-env.sh \ + && echo "export PGIS1_GDAL_BUILD={{ .[env.variant].GDAL_BUILD }}" >> /usr/local/share/docker-postgis-env.sh \ + && chmod +x /usr/local/share/docker-postgis-env.sh \ + \ && apt-get update \ && apt-get install -y --no-install-recommends \ curl \ @@ -296,12 +309,14 @@ RUN set -eux \ # add backports \ && apt-get update \ && apt install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-{{ env.variant }}.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-{{ env.variant }}.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-{{ env.variant }}.deb \ && apt-get update \ # Automatically determine the latest PGIS1 Arrow version and SOVERSION && apt-cache showpkg libarrow-dev \ - && PGIS1_ARROW_VERSION=$(apt-cache showpkg libarrow-dev | grep -m1 'Versions:' -A1 | tail -n1 | grep -oP '^\S+') \ + && PGIS1_ARROW_VERSION=$(apt-cache madison libarrow-dev | head -1 | awk '{print $3}') \ + && [ -n "$PGIS1_ARROW_VERSION" ] || { echo "Failed to detect Arrow version"; exit 1; } \ && apt-cache depends libarrow-dev=${PGIS1_ARROW_VERSION} | tee /_pgis1_libarrow-dev-dependencies.txt \ && PGIS1_ARROW_SOVERSION=$(grep 'Depends: libarrow' /_pgis1_libarrow-dev-dependencies.txt | grep -oP 'libarrow\K[0-9]+') \ && echo "Detected PGIS1_ARROW_VERSION=$PGIS1_ARROW_VERSION" \ @@ -448,9 +463,26 @@ RUN set -eux \ # ------------------------------------------- FROM ${PGIS1_BASE_IMAGE} -LABEL maintainer="PostGIS Project - https://postgis.net" \ +ARG PGIS1_SOURCE_REPO +ARG PGIS1_MAINTAINER +ARG PGIS1_BASE_IMAGE + +LABEL maintainer="${PGIS1_MAINTAINER}" \ 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" + org.opencontainers.image.source="${PGIS1_SOURCE_REPO}" \ + org.opencontainers.image.version="{{ env.version }}" \ + org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.opencontainers.image.base.name="${PGIS1_BASE_IMAGE}" \ + \ + # child friendly image labels, so some duplacted labels expected + org.postgis.base.maintainer="${PGIS1_MAINTAINER}" \ + org.postgis.base.description="PostGIS - {{ env.version }} spatial database extension with PostgreSQL {{ .[env.variant].PG_MAJOR }} {{ env.variant }}" \ + org.postgis.base.source="${PGIS1_SOURCE_REPO}" \ + org.postgis.base.version="{{ env.version }}" \ + org.postgis.base.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ + org.postgis.base.extensions="postgis,postgis_raster,postgis_sfcgal,postgis_topology,postgis_tiger_geocoder,address_standardizer" \ + org.postgis.base.name="${PGIS1_BASE_IMAGE}" \ + org.postgis.base.repositories="POSTGIS:${PGIS1_POSTGIS_REPOSITORY},GEOS:${PGIS1_GEOS_REPOSITORY},GDAL:${PGIS1_GDAL_REPOSITORY},PROJ:${PGIS1_PROJ_REPOSITORY},SFCGAL:${PGIS1_SFCGAL_REPOSITORY},CGAL:${PGIS1_CGAL_REPOSITORY}" ARG PGIS1_CMAKE_BUILD_TYPE ARG PGIS1_BASE_IMAGE @@ -461,7 +493,10 @@ ENV PGIS1_CMAKE_BUILD_TYPE=${PGIS1_CMAKE_BUILD_TYPE} \ PGIS1_BOOST_VERSION=${PGIS1_BOOST_VERSION} RUN set -eux \ + # Update environment export with runtime packages && apt-get update \ + && BOOST_INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' libboost-atomic${PGIS1_BOOST_VERSION} 2>/dev/null || echo "not-found") \ + && echo "export BOOST_INSTALLED_VERSION=${BOOST_INSTALLED_VERSION}" >> /usr/local/share/docker-postgis-env.sh \ && apt-get install -y -V --no-install-recommends \ \ curl \ @@ -503,7 +538,8 @@ RUN set -eux \ # Install Arrow + Parquet && apt-get update \ && apt-get install -y -V ca-certificates wget \ - && wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-{{ env.variant }}.deb \ + && wget -q --timeout=30 --tries=3 https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-{{ env.variant }}.deb \ + || { echo "Failed to download Arrow apt source"; exit 1; } \ && apt-get install -y -V ./apache-arrow-apt-source-latest-{{ env.variant }}.deb \ && apt-get update \ # Load the PGIS1_ARROW version variables @@ -692,6 +728,12 @@ RUN set -eux \ && rm -rf /tmp/logfile \ && rm -rf /tmp/pgis_reg \ # clean + # Add final version information to environment export + && echo "PostGIS build completed at $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> /usr/local/share/docker-postgis-env.sh \ + && find /_pgis*_commit.txt -type f -exec basename {} \; | while read commit_file; do \ + commit_hash=$(cat "/${commit_file}" | head -1 | awk '{print $2}') \ + && echo "export ${commit_file%.txt}=\"${commit_hash}\"" >> /usr/local/share/docker-postgis-env.sh; \ + done \ && cd / \ && rm -rf /usr/src/postgis \ && apt-get purge -y --autoremove \ diff --git a/initdb-bundle0.sh b/templates/initdb-bundle0.sh similarity index 100% rename from initdb-bundle0.sh rename to templates/initdb-bundle0.sh diff --git a/17rc1-master/bookworm/initdb-postgis.sh b/templates/initdb-postgis.sh similarity index 100% rename from 17rc1-master/bookworm/initdb-postgis.sh rename to templates/initdb-postgis.sh diff --git a/17rc1-master/bookworm/update-postgis.sh b/templates/update-postgis.sh similarity index 100% rename from 17rc1-master/bookworm/update-postgis.sh rename to templates/update-postgis.sh diff --git a/test/tests/postgis-bundle/run.sh b/test/tests/postgis-bundle/run.sh index 1c51cf324..51d715c94 100755 --- a/test/tests/postgis-bundle/run.sh +++ b/test/tests/postgis-bundle/run.sh @@ -31,7 +31,7 @@ psql() { # Set default values for POSTGRES_TEST_TRIES and POSTGRES_TEST_SLEEP if they are not set. # You can change the default value of POSTGRES_TEST_TRIES and the POSTGRES_TEST_SLEEP in the CI build settings. # For special cases like Buildx/qemu tests, you may need to set POSTGRES_TEST_TRIES to 42. -: "${POSTGRES_TEST_TRIES:=15}" +: "${POSTGRES_TEST_TRIES:=30}" : "${POSTGRES_TEST_SLEEP:=2}" tries="$POSTGRES_TEST_TRIES" while ! echo 'SELECT 1' | psql &>/dev/null; do @@ -44,25 +44,48 @@ while ! echo 'SELECT 1' | psql &>/dev/null; do sleep "$POSTGRES_TEST_SLEEP" done +# -------- not working ; need more debug ---------- +##"" +##-- create extension if not exists periods cascade; +##-- create extension if not exists pg_cron cascade; +##-- create extension if not exists pg_stat_kcache cascade; +##-- create extension if not exists pg_xenophile cascade; +##-- create extension if not exists pgsodium cascade; +##""" + ## Minimal create extension test echo " -create extension if not exists asn1oid cascade; -create extension if not exists ddlx cascade; -create extension if not exists gzip cascade; -create extension if not exists h3 cascade; -create extension if not exists h3_postgis cascade; +create extension if not exists age cascade; +create extension if not exists byteamagic cascade; +create extension if not exists credcheck cascade; +create extension if not exists ddlx cascade; +create extension if not exists file_fdw cascade; +create extension if not exists first_last_agg cascade; +create extension if not exists gzip cascade; +create extension if not exists gzip cascade; +create extension if not exists h3 cascade; +create extension if not exists h3_postgis cascade; create extension if not exists hstore_plpython3u cascade; -create extension if not exists http cascade; -create extension if not exists mobilitydb cascade; -create extension if not exists ogr_fdw cascade; -create extension if not exists pg_curl cascade; -create extension if not exists pg_uuidv7 cascade; -create extension if not exists pgrouting cascade; -create extension if not exists pgtap cascade; -create extension if not exists plpython3u cascade; -create extension if not exists prioritize cascade; -create extension if not exists q3c cascade; -create extension if not exists vector cascade; +create extension if not exists http cascade; +create extension if not exists hypopg cascade; +create extension if not exists icu_ext cascade; +create extension if not exists json_accessors cascade; +create extension if not exists mobilitydb cascade; +create extension if not exists moddatetime cascade; +create extension if not exists numeral cascade; +create extension if not exists ogr_fdw cascade; +create extension if not exists permuteseq cascade; +create extension if not exists pg_buffercache cascade; +create extension if not exists pg_curl cascade; +create extension if not exists pg_fact_loader cascade; +create extension if not exists pg_show_plans cascade; +create extension if not exists pg_uuidv7 cascade; +create extension if not exists pgrouting cascade; +create extension if not exists pgtap cascade; +create extension if not exists plpython3u cascade; +create extension if not exists prioritize cascade; +create extension if not exists q3c cascade; +create extension if not exists vector cascade; " | psql echo " diff --git a/_migrate.sh b/tools/_migrate.sh similarity index 100% rename from _migrate.sh rename to tools/_migrate.sh diff --git a/apply-ci.sh b/tools/apply-ci.sh similarity index 100% rename from apply-ci.sh rename to tools/apply-ci.sh diff --git a/apply-manifest.sh b/tools/apply-manifest.sh similarity index 88% rename from apply-manifest.sh rename to tools/apply-manifest.sh index f2dda9475..fea0181b3 100755 --- a/apply-manifest.sh +++ b/tools/apply-manifest.sh @@ -5,20 +5,21 @@ source tools/environment_init.sh [ -f ./versions.json ] input_file="versions.json" -rm -f manifest.sh +rm -f ./tools/manifest.sh -cat <<'EOF' >manifest.sh +cat <<'EOF' > ./tools/manifest.sh #!/usr/bin/env bash set -Eeuo pipefail # Source environment variables and necessary configurations source tools/environment_init.sh +[ -f ./versions.json ] # # Updating the docker manifest for the postgis image. # This script uses the version.json metadata file as input to create the updated manifest. # manifest-tool doc : https://github.com/estesp/manifest-tool # -# NOTE: THIS FILE IS GENERATED VIA "./apply-manifest.sh" +# NOTE: THIS FILE IS GENERATED VIA "./tools/apply-manifest.sh" # PLEASE DO NOT EDIT IT DIRECTLY. # EOF @@ -74,11 +75,11 @@ for version in $versions; do echo "" echo "# ----- ${version}-${variant} -----" create_manifest "$tags" "$arch" - ) >>manifest.sh + ) >> ./tools/manifest.sh done done -echo "Done! a new ./manifest.sh has been created!" -chmod +x ./manifest.sh -head -n 50 <./manifest.sh +echo "Done! a new ./tools/manifest.sh has been created!" +chmod +x ./tools/manifest.sh +head -n 50 <./tools/manifest.sh diff --git a/apply-readme.sh b/tools/apply-readme.sh similarity index 100% rename from apply-readme.sh rename to tools/apply-readme.sh diff --git a/apply-templates.sh b/tools/apply-templates.sh similarity index 85% rename from apply-templates.sh rename to tools/apply-templates.sh index 857346b77..f8dbcfed9 100755 --- a/apply-templates.sh +++ b/tools/apply-templates.sh @@ -11,7 +11,6 @@ source tools/environment_init.sh # Check dependencies [ -f ./versions.json ] -cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" jqt='.jq-template.awk' if [ -n "${BASHBREW_SCRIPTS:-}" ]; then jqt="$BASHBREW_SCRIPTS/jq-template.awk" @@ -37,7 +36,7 @@ echo "versions = $versions" generated_warning() { cat <<-EOH # - # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" + # NOTE: THIS DOCKERFILE IS GENERATED VIA "./tools/apply-templates.sh" # source: "$1" # PLEASE DO NOT EDIT IT DIRECTLY. # @@ -57,10 +56,10 @@ for version; do dir="$version/$variant" echo "processing $dir ..." - template="$(jq -r '.[env.version][env.variant].template' versions.json)" + template=./templates/"$(jq -r '.[env.version][env.variant].template' versions.json)" echo " template=$template" - initfile="$(jq -r '.[env.version][env.variant].initfile' versions.json)" + initfile=./templates/"$(jq -r '.[env.version][env.variant].initfile' versions.json)" echo " initfile=$initfile" tags="$(jq -r '.[env.version][env.variant].tags' versions.json)" @@ -68,7 +67,7 @@ for version; do cp -a "$initfile" "$dir/" if [ -z "$bundleType" ]; then - cp -a update-postgis.sh "$dir/" + cp -a ./templates/update-postgis.sh "$dir/" fi echo "$tags" >"$dir/tags" @@ -82,5 +81,5 @@ for version; do done echo " " -echo " apply-template : done" +echo " ./tools/apply-template : done" echo " " diff --git a/tools/cache_helper.sh b/tools/cache_helper.sh new file mode 100755 index 000000000..e4bf4648b --- /dev/null +++ b/tools/cache_helper.sh @@ -0,0 +1,154 @@ +#!/bin/bash +# Cache management functions for API calls +# Reduces GitHub API rate limiting by caching responses + +set -Eeuo pipefail + +CACHE_DIR="_cache" +CACHE_TIMESTAMPS_FILE="${CACHE_DIR}/cache_timestamps.txt" + +# Initialize cache directory +cache_init() { + mkdir -p "$CACHE_DIR" + [[ -f "$CACHE_TIMESTAMPS_FILE" ]] || touch "$CACHE_TIMESTAMPS_FILE" +} + +# Check if cache file is valid (within TTL) +cache_is_valid() { + local cache_file="$1" + local ttl_hours="${2:-6}" + local max_age=$((ttl_hours * 3600)) + + if [[ -f "$cache_file" ]]; then + local file_age=$(( $(date +%s) - $(stat -c %Y "$cache_file") )) + if [[ $file_age -lt $max_age ]]; then + return 0 # Valid + fi + fi + return 1 # Invalid or doesn't exist +} + +# Get data from cache if valid +cache_get() { + local cache_key="$1" + local cache_file="${CACHE_DIR}/${cache_key}.txt" + local ttl_hours="${2:-6}" + + cache_init + + if cache_is_valid "$cache_file" "$ttl_hours"; then + echo "# Cache hit: $cache_key ($(stat -c %y "$cache_file"))" >&2 + cat "$cache_file" + return 0 + else + echo "# Cache miss: $cache_key" >&2 + return 1 + fi +} + +# Store data in cache +cache_store() { + local cache_key="$1" + local data="$2" + local cache_file="${CACHE_DIR}/${cache_key}.txt" + + cache_init + + echo "$data" > "$cache_file" + + # Update timestamp record + grep -v "^${cache_key}=" "$CACHE_TIMESTAMPS_FILE" > "${CACHE_TIMESTAMPS_FILE}.tmp" 2>/dev/null || true + echo "${cache_key}=$(date +%s)" >> "${CACHE_TIMESTAMPS_FILE}.tmp" + mv "${CACHE_TIMESTAMPS_FILE}.tmp" "$CACHE_TIMESTAMPS_FILE" + + echo "# Cached: $cache_key" >&2 +} + +# Clean old cache files +cache_cleanup() { + local days_old="${1:-7}" + + if [[ -d "$CACHE_DIR" ]]; then + echo "# Cleaning cache files older than $days_old days..." >&2 + find "$CACHE_DIR" -name "*.txt" -type f -mtime +"$days_old" -delete 2>/dev/null || true + fi +} + +# Show cache status +cache_status() { + echo "# Cache Directory: $CACHE_DIR" + if [[ -d "$CACHE_DIR" ]]; then + echo "# Cache files:" + find "$CACHE_DIR" -name "*.txt" -type f -exec ls -lah {} \; 2>/dev/null || echo "# No cache files found" + else + echo "# Cache directory doesn't exist" + fi +} + +# Wrapper for curl with cache support +cached_curl() { + local cache_key="$1" + local url="$2" + local ttl_hours="${3:-6}" + shift 3 + local curl_args=("$@") + + # Try cache first + if cache_get "$cache_key" "$ttl_hours"; then + return 0 + fi + + # Cache miss - make API call + echo "# Fetching from API: $url" >&2 + local response + if response=$(curl -s "${curl_args[@]}" "$url"); then + cache_store "$cache_key" "$response" + echo "$response" + return 0 + else + echo "# API call failed for: $url" >&2 + return 1 + fi +} + +# Check GitHub rate limit before making API calls +check_github_rate_limit() { + local min_required="${1:-8}" # Default: need at least 8 requests + + echo "# Checking GitHub rate limit before API calls..." + + # Get rate limit info from headers + local rateLimitHeaders + if ! rateLimitHeaders=$(curl -sI https://api.github.com/users/postgis 2>/dev/null | grep -i x-ratelimit); then + echo "# Failed to check GitHub rate limit - proceeding with caution" + return 0 # Allow to continue if check fails + fi + + local rateLimitRemaining + rateLimitRemaining=$(echo "$rateLimitHeaders" | grep -i 'x-ratelimit-remaining:' | grep -o '[[:digit:]]*' || echo "0") + + echo "# GitHub rate limit remaining: $rateLimitRemaining" + + if [ "${rateLimitRemaining}" -le "${min_required}" ]; then + echo + echo " You do not have enough github requests available to continue!" + echo " Current remaining: $rateLimitRemaining, required: $min_required" + echo + echo " Without logging - the github api is limited to 60 requests per hour" + echo " see: https://developer.github.com/v3/#rate-limiting " + echo " You can check your remaining requests with :" + echo " curl -sI https://api.github.com/users/postgis | grep x-ratelimit " + echo + echo " ------------------------ " + echo "$rateLimitHeaders" + echo + echo " The limit will be reset at :" + echo "$rateLimitHeaders" | grep -i 'x-ratelimit-reset:' | cut -d' ' -f2 | xargs -I {} date -d @{} 2>/dev/null || echo "Unable to parse reset time" + return 1 # Fail - not enough requests + fi + + return 0 # Success - enough requests available +} + +# Export functions for use in other scripts +export -f cache_init cache_is_valid cache_get cache_store cache_cleanup cache_status cached_curl check_github_rate_limit \ No newline at end of file diff --git a/tools/environment_init.sh b/tools/environment_init.sh index 1657e36ea..fe6da9ff5 100755 --- a/tools/environment_init.sh +++ b/tools/environment_init.sh @@ -60,8 +60,14 @@ IMAGE_VERSION_ID="" # Generate IMAGE_VERSION_ID if ENABLE_IMAGE_VERSION_ID is set to true if [[ "${ENABLE_IMAGE_VERSION_ID:-}" == "true" ]]; then # Note: Make sure to keep this synchronized with the corresponding section in Makefile - COMMIT_DATE=$(git log -1 --format=%cd --date=format:%Y%m%d) - COMMIT_HASH=$(git log -1 --pretty=format:%h) + if git rev-parse --git-dir >/dev/null 2>&1; then + COMMIT_DATE=$(git log -1 --format=%cd --date=format:%Y%m%d) + COMMIT_HASH=$(git log -1 --pretty=format:%h) + else + echo "Warning: Not in a git repository. Using fallback values for IMAGE_VERSION_ID." >&2 + COMMIT_DATE="00000000" + COMMIT_HASH="00000000" + fi BUILD_WEEK=$(date '+%Yw%V') IMAGE_VERSION_ID="-ver${COMMIT_DATE}-${COMMIT_HASH}-${BUILD_WEEK}" fi @@ -78,7 +84,7 @@ echo " " # Verify that the required command-line tools (jq, gawk, python3, .. ) are available in the system's PATH. # Exit with an error message if any of them are missing. -for cmd in docker jq gawk curl python3 manifest-tool lastversion; do +for cmd in docker jq check-jsonschema gawk curl python3 manifest-tool lastversion; do if ! command -v "$cmd" &>/dev/null; then echo "Error: $cmd is not installed." exit 1 diff --git a/tools/install_dive.sh b/tools/install_dive.sh index a7a09789b..b6537a952 100755 --- a/tools/install_dive.sh +++ b/tools/install_dive.sh @@ -1,16 +1,16 @@ #!/bin/bash set -Eeuo pipefail -# https://github.com/wagoodman/dive/releases/tag/v0.12.0 -version="0.12.0" +# https://github.com/wagoodman/dive/releases/tag/v0.13.1 +version="0.13.1" # Determine IMAGE_ARCH based on the machine architecture if [[ "$(uname -m)" == "x86_64" ]]; then IMAGE_ARCH=amd64 - checksum="20a7966523a0905f950c4fbf26471734420d6788cfffcd4a8c4bc972fded3e96 tools/dive_0.12.0_linux_amd64.tar.gz" + checksum="0970549eb4a306f8825a84145a2534153badb4d7dcf3febd1967c706367c3d0e tools/dive_0.13.1_linux_amd64.tar.gz" elif [[ "$(uname -m)" == "aarch64" ]]; then IMAGE_ARCH=arm64 - checksum="a2a1470302cdfa367a48f80b67bbf11c0cd8039af9211e39515bd2bbbda58fea tools/dive_0.12.0_linux_arm64.tar.gz" + checksum="2fcd2cf20f634ccdb41efac44048b204bfc867c115641f37a7420693ed480a18 tools/dive_0.13.1_linux_arm64.tar.gz" else echo "Architecture not supported: $(uname -m)" exit 1 diff --git a/tools/install_manifest-tool.sh b/tools/install_manifest-tool.sh index d20ac623a..785c8e34a 100755 --- a/tools/install_manifest-tool.sh +++ b/tools/install_manifest-tool.sh @@ -2,7 +2,7 @@ set -Eeuo pipefail # https://github.com/estesp/manifest-tool -version="2.1.6" +version="2.2.0" # Determine IMAGE_ARCH based on the machine architecture if [[ "$(uname -m)" == "x86_64" ]]; then diff --git a/tools/install_shellcheck.sh b/tools/install_shellcheck.sh index 258126e70..57dfc5fb3 100755 --- a/tools/install_shellcheck.sh +++ b/tools/install_shellcheck.sh @@ -3,7 +3,7 @@ set -Eeuo pipefail # https://github.com/koalaman/shellcheck#installing-a-pre-compiled-binary -scversion="stable" # or "v0.4.7", or "latest" +scversion="stable" wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv cp "shellcheck-${scversion}/shellcheck" /usr/bin/ shellcheck --version diff --git a/localtest.sh b/tools/localtest.sh similarity index 87% rename from localtest.sh rename to tools/localtest.sh index c3427882a..d3beae313 100755 --- a/localtest.sh +++ b/tools/localtest.sh @@ -5,6 +5,7 @@ set -Eeuo pipefail export TEST=true # Source environment variables and necessary configurations source tools/environment_init.sh +[ -f ./versions.json ] # Check if the container with name "registry" is already running # https://docs.docker.com/registry/deploying/ @@ -28,7 +29,9 @@ fi # check update code ./update.sh -test_tag=16-3.4-bookworm +check-jsonschema --schemafile versions.schema.json versions.json + +test_tag=17-3.5-bookworm # check commands make -n test-${test_tag} @@ -74,10 +77,3 @@ echo "WARNING: Be carefull and not push the .localtest.sh script generated Dock echo " because contains reference to the test REGISTRY, REPO_NAME and IMAGE_NAME!" echo " " echo "done." - -# manual tests cheetsheets: -# ---------------------------- -# 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/tools/manifest.sh b/tools/manifest.sh new file mode 100755 index 000000000..fa047a4fb --- /dev/null +++ b/tools/manifest.sh @@ -0,0 +1,846 @@ +#!/usr/bin/env bash +set -Eeuo pipefail +# Source environment variables and necessary configurations +source tools/environment_init.sh +[ -f ./versions.json ] + +# +# Updating the docker manifest for the postgis image. +# This script uses the version.json metadata file as input to create the updated manifest. +# manifest-tool doc : https://github.com/estesp/manifest-tool +# +# NOTE: THIS FILE IS GENERATED VIA "./tools/apply-manifest.sh" +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# ----- 13-3.3-alpine3.21 ----- + +echo "manifest: ${dockername}:13-3.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.3-alpine3.21 \ + --target ${dockername}:13-3.3-alpine3.21 || true + +echo "manifest: ${dockername}:13-3.3.8-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.3.8-alpine3.21 \ + --target ${dockername}:13-3.3.8-alpine3.21 || true + +# ----- 13-3.4-alpine3.21 ----- + +echo "manifest: ${dockername}:13-3.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.4-alpine3.21 \ + --target ${dockername}:13-3.4-alpine3.21 || true + +echo "manifest: ${dockername}:13-3.4.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.4.4-alpine3.21 \ + --target ${dockername}:13-3.4.4-alpine3.21 || true + +# ----- 13-3.4-alpine3.22 ----- + +echo "manifest: ${dockername}:13-3.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.4-alpine3.22 \ + --target ${dockername}:13-3.4-alpine3.22 || true + +echo "manifest: ${dockername}:13-3.4.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.4.4-alpine3.22 \ + --target ${dockername}:13-3.4.4-alpine3.22 || true + +echo "manifest: ${dockername}:13-3.4-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.4-alpine \ + --target ${dockername}:13-3.4-alpine || true + +# ----- 13-3.5-alpine3.21 ----- + +echo "manifest: ${dockername}:13-3.5-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5-alpine3.21 \ + --target ${dockername}:13-3.5-alpine3.21 || true + +echo "manifest: ${dockername}:13-3.5.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5.3-alpine3.21 \ + --target ${dockername}:13-3.5.3-alpine3.21 || true + +# ----- 13-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:13-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5-alpine3.22 \ + --target ${dockername}:13-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:13-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5.3-alpine3.22 \ + --target ${dockername}:13-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:13-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5-alpine \ + --target ${dockername}:13-3.5-alpine || true + +# ----- 13-3.5-bookworm ----- + +echo "manifest: ${dockername}:13-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5-bookworm \ + --target ${dockername}:13-3.5-bookworm || true + +echo "manifest: ${dockername}:13-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5.3-bookworm \ + --target ${dockername}:13-3.5.3-bookworm || true + +echo "manifest: ${dockername}:13-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5 \ + --target ${dockername}:13-3.5 || true + +# ----- 13-3.5-bullseye ----- + +echo "manifest: ${dockername}:13-3.5-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5-bullseye \ + --target ${dockername}:13-3.5-bullseye || true + +echo "manifest: ${dockername}:13-3.5.2-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:13-3.5.2-bullseye \ + --target ${dockername}:13-3.5.2-bullseye || true + +# ----- 14-3.3-alpine3.21 ----- + +echo "manifest: ${dockername}:14-3.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.3-alpine3.21 \ + --target ${dockername}:14-3.3-alpine3.21 || true + +echo "manifest: ${dockername}:14-3.3.8-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.3.8-alpine3.21 \ + --target ${dockername}:14-3.3.8-alpine3.21 || true + +# ----- 14-3.4-alpine3.21 ----- + +echo "manifest: ${dockername}:14-3.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.4-alpine3.21 \ + --target ${dockername}:14-3.4-alpine3.21 || true + +echo "manifest: ${dockername}:14-3.4.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.4.4-alpine3.21 \ + --target ${dockername}:14-3.4.4-alpine3.21 || true + +# ----- 14-3.4-alpine3.22 ----- + +echo "manifest: ${dockername}:14-3.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.4-alpine3.22 \ + --target ${dockername}:14-3.4-alpine3.22 || true + +echo "manifest: ${dockername}:14-3.4.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.4.4-alpine3.22 \ + --target ${dockername}:14-3.4.4-alpine3.22 || true + +echo "manifest: ${dockername}:14-3.4-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.4-alpine \ + --target ${dockername}:14-3.4-alpine || true + +# ----- 14-3.5-alpine3.21 ----- + +echo "manifest: ${dockername}:14-3.5-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5-alpine3.21 \ + --target ${dockername}:14-3.5-alpine3.21 || true + +echo "manifest: ${dockername}:14-3.5.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5.3-alpine3.21 \ + --target ${dockername}:14-3.5.3-alpine3.21 || true + +# ----- 14-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:14-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5-alpine3.22 \ + --target ${dockername}:14-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:14-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5.3-alpine3.22 \ + --target ${dockername}:14-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:14-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5-alpine \ + --target ${dockername}:14-3.5-alpine || true + +# ----- 14-3.5-bookworm ----- + +echo "manifest: ${dockername}:14-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5-bookworm \ + --target ${dockername}:14-3.5-bookworm || true + +echo "manifest: ${dockername}:14-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5.3-bookworm \ + --target ${dockername}:14-3.5.3-bookworm || true + +echo "manifest: ${dockername}:14-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5 \ + --target ${dockername}:14-3.5 || true + +# ----- 14-3.5-bullseye ----- + +echo "manifest: ${dockername}:14-3.5-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5-bullseye \ + --target ${dockername}:14-3.5-bullseye || true + +echo "manifest: ${dockername}:14-3.5.2-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-3.5.2-bullseye \ + --target ${dockername}:14-3.5.2-bullseye || true + +# ----- 14-l3.1.9gcp-bookworm ----- + +echo "manifest: ${dockername}:14-l3.1.9gcp-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-l3.1.9gcp-bookworm \ + --target ${dockername}:14-l3.1.9gcp-bookworm || true + +echo "manifest: ${dockername}:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm \ + --target ${dockername}:14-l3.1.9gcp-postgis3.1.9-geos3.6.6-proj6.3.1-bookworm || true + +# ----- 15-3.3-alpine3.21 ----- + +echo "manifest: ${dockername}:15-3.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.3-alpine3.21 \ + --target ${dockername}:15-3.3-alpine3.21 || true + +echo "manifest: ${dockername}:15-3.3.8-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.3.8-alpine3.21 \ + --target ${dockername}:15-3.3.8-alpine3.21 || true + +# ----- 15-3.4-alpine3.21 ----- + +echo "manifest: ${dockername}:15-3.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.4-alpine3.21 \ + --target ${dockername}:15-3.4-alpine3.21 || true + +echo "manifest: ${dockername}:15-3.4.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.4.4-alpine3.21 \ + --target ${dockername}:15-3.4.4-alpine3.21 || true + +# ----- 15-3.4-alpine3.22 ----- + +echo "manifest: ${dockername}:15-3.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.4-alpine3.22 \ + --target ${dockername}:15-3.4-alpine3.22 || true + +echo "manifest: ${dockername}:15-3.4.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.4.4-alpine3.22 \ + --target ${dockername}:15-3.4.4-alpine3.22 || true + +echo "manifest: ${dockername}:15-3.4-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.4-alpine \ + --target ${dockername}:15-3.4-alpine || true + +# ----- 15-3.5-alpine3.21 ----- + +echo "manifest: ${dockername}:15-3.5-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5-alpine3.21 \ + --target ${dockername}:15-3.5-alpine3.21 || true + +echo "manifest: ${dockername}:15-3.5.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5.3-alpine3.21 \ + --target ${dockername}:15-3.5.3-alpine3.21 || true + +# ----- 15-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:15-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5-alpine3.22 \ + --target ${dockername}:15-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:15-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5.3-alpine3.22 \ + --target ${dockername}:15-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:15-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5-alpine \ + --target ${dockername}:15-3.5-alpine || true + +# ----- 15-3.5-bookworm ----- + +echo "manifest: ${dockername}:15-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5-bookworm \ + --target ${dockername}:15-3.5-bookworm || true + +echo "manifest: ${dockername}:15-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5.3-bookworm \ + --target ${dockername}:15-3.5.3-bookworm || true + +echo "manifest: ${dockername}:15-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5 \ + --target ${dockername}:15-3.5 || true + +# ----- 15-3.5-bullseye ----- + +echo "manifest: ${dockername}:15-3.5-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5-bullseye \ + --target ${dockername}:15-3.5-bullseye || true + +echo "manifest: ${dockername}:15-3.5.2-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:15-3.5.2-bullseye \ + --target ${dockername}:15-3.5.2-bullseye || true + +# ----- 16-3.3-alpine3.21 ----- + +echo "manifest: ${dockername}:16-3.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.3-alpine3.21 \ + --target ${dockername}:16-3.3-alpine3.21 || true + +echo "manifest: ${dockername}:16-3.3.8-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.3.8-alpine3.21 \ + --target ${dockername}:16-3.3.8-alpine3.21 || true + +# ----- 16-3.4-alpine3.21 ----- + +echo "manifest: ${dockername}:16-3.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.4-alpine3.21 \ + --target ${dockername}:16-3.4-alpine3.21 || true + +echo "manifest: ${dockername}:16-3.4.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.4.4-alpine3.21 \ + --target ${dockername}:16-3.4.4-alpine3.21 || true + +# ----- 16-3.4-alpine3.22 ----- + +echo "manifest: ${dockername}:16-3.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.4-alpine3.22 \ + --target ${dockername}:16-3.4-alpine3.22 || true + +echo "manifest: ${dockername}:16-3.4.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.4.4-alpine3.22 \ + --target ${dockername}:16-3.4.4-alpine3.22 || true + +echo "manifest: ${dockername}:16-3.4-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.4-alpine \ + --target ${dockername}:16-3.4-alpine || true + +# ----- 16-3.5-alpine3.21 ----- + +echo "manifest: ${dockername}:16-3.5-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-alpine3.21 \ + --target ${dockername}:16-3.5-alpine3.21 || true + +echo "manifest: ${dockername}:16-3.5.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5.3-alpine3.21 \ + --target ${dockername}:16-3.5.3-alpine3.21 || true + +# ----- 16-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:16-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-alpine3.22 \ + --target ${dockername}:16-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:16-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5.3-alpine3.22 \ + --target ${dockername}:16-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:16-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-alpine \ + --target ${dockername}:16-3.5-alpine || true + +# ----- 16-3.5-bookworm ----- + +echo "manifest: ${dockername}:16-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-bookworm \ + --target ${dockername}:16-3.5-bookworm || true + +echo "manifest: ${dockername}:16-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5.3-bookworm \ + --target ${dockername}:16-3.5.3-bookworm || true + +echo "manifest: ${dockername}:16-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5 \ + --target ${dockername}:16-3.5 || true + +# ----- 16-3.5-bullseye ----- + +echo "manifest: ${dockername}:16-3.5-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-bullseye \ + --target ${dockername}:16-3.5-bullseye || true + +echo "manifest: ${dockername}:16-3.5.2-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5.2-bullseye \ + --target ${dockername}:16-3.5.2-bullseye || true + +# ----- 16-3.5-bundle0-bookworm ----- + +echo "manifest: ${dockername}:16-3.5-bundle0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-bundle0-bookworm \ + --target ${dockername}:16-3.5-bundle0-bookworm || true + +echo "manifest: ${dockername}:16-3.5.3-bundle0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5.3-bundle0-bookworm \ + --target ${dockername}:16-3.5.3-bundle0-bookworm || true + +echo "manifest: ${dockername}:16-3.5-bundle0" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-3.5-bundle0 \ + --target ${dockername}:16-3.5-bundle0 || true + +# ----- 16-master-bookworm ----- + +echo "manifest: ${dockername}:16-master-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-master-bookworm \ + --target ${dockername}:16-master-bookworm || true + +echo "manifest: ${dockername}:16-master" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-master \ + --target ${dockername}:16-master || true + +# ----- 16-recent-bookworm ----- + +echo "manifest: ${dockername}:16-recent-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-recent-bookworm \ + --target ${dockername}:16-recent-bookworm || true + +echo "manifest: ${dockername}:16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm \ + --target ${dockername}:16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm || true + +echo "manifest: ${dockername}:16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm \ + --target ${dockername}:16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm || true + +echo "manifest: ${dockername}:16-recent" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:16-recent \ + --target ${dockername}:16-recent || true + +# ----- 17-3.4-alpine3.21 ----- + +echo "manifest: ${dockername}:17-3.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.4-alpine3.21 \ + --target ${dockername}:17-3.4-alpine3.21 || true + +echo "manifest: ${dockername}:17-3.4.4-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.4.4-alpine3.21 \ + --target ${dockername}:17-3.4.4-alpine3.21 || true + +# ----- 17-3.4-alpine3.22 ----- + +echo "manifest: ${dockername}:17-3.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.4-alpine3.22 \ + --target ${dockername}:17-3.4-alpine3.22 || true + +echo "manifest: ${dockername}:17-3.4.4-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.4.4-alpine3.22 \ + --target ${dockername}:17-3.4.4-alpine3.22 || true + +echo "manifest: ${dockername}:17-3.4-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.4-alpine \ + --target ${dockername}:17-3.4-alpine || true + +# ----- 17-3.5-alpine3.21 ----- + +echo "manifest: ${dockername}:17-3.5-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-alpine3.21 \ + --target ${dockername}:17-3.5-alpine3.21 || true + +echo "manifest: ${dockername}:17-3.5.3-alpine3.21" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5.3-alpine3.21 \ + --target ${dockername}:17-3.5.3-alpine3.21 || true + +# ----- 17-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:17-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-alpine3.22 \ + --target ${dockername}:17-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:17-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5.3-alpine3.22 \ + --target ${dockername}:17-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:17-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-alpine \ + --target ${dockername}:17-3.5-alpine || true + +echo "manifest: ${dockername}:alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:alpine \ + --target ${dockername}:alpine || true + +# ----- 17-3.5-bookworm ----- + +echo "manifest: ${dockername}:17-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-bookworm \ + --target ${dockername}:17-3.5-bookworm || true + +echo "manifest: ${dockername}:17-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5.3-bookworm \ + --target ${dockername}:17-3.5.3-bookworm || true + +echo "manifest: ${dockername}:17-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5 \ + --target ${dockername}:17-3.5 || true + +echo "manifest: ${dockername}:latest" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:latest \ + --target ${dockername}:latest || true + +# ----- 17-3.5-bullseye ----- + +echo "manifest: ${dockername}:17-3.5-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-bullseye \ + --target ${dockername}:17-3.5-bullseye || true + +echo "manifest: ${dockername}:17-3.5.2-bullseye" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5.2-bullseye \ + --target ${dockername}:17-3.5.2-bullseye || true + +# ----- 17-3.5-bundle0-bookworm ----- + +echo "manifest: ${dockername}:17-3.5-bundle0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-bundle0-bookworm \ + --target ${dockername}:17-3.5-bundle0-bookworm || true + +echo "manifest: ${dockername}:17-3.5.3-bundle0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5.3-bundle0-bookworm \ + --target ${dockername}:17-3.5.3-bundle0-bookworm || true + +echo "manifest: ${dockername}:17-3.5-bundle0" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.5-bundle0 \ + --target ${dockername}:17-3.5-bundle0 || true + +echo "manifest: ${dockername}:bundle0" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:bundle0 \ + --target ${dockername}:bundle0 || true + +# ----- 17-3.6-alpine3.22 ----- + +echo "manifest: ${dockername}:17-3.6.0alpha1-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.6.0alpha1-alpine3.22 \ + --target ${dockername}:17-3.6.0alpha1-alpine3.22 || true + +echo "manifest: ${dockername}:17-3.6.0alpha1-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-3.6.0alpha1-alpine \ + --target ${dockername}:17-3.6.0alpha1-alpine || true + +# ----- 17-master-bookworm ----- + +echo "manifest: ${dockername}:17-master-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-master-bookworm \ + --target ${dockername}:17-master-bookworm || true + +echo "manifest: ${dockername}:17-master" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-master \ + --target ${dockername}:17-master || true + +# ----- 17-recent-bookworm ----- + +echo "manifest: ${dockername}:17-recent-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-recent-bookworm \ + --target ${dockername}:17-recent-bookworm || true + +echo "manifest: ${dockername}:17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm \ + --target ${dockername}:17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm || true + +echo "manifest: ${dockername}:17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm \ + --target ${dockername}:17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm || true + +echo "manifest: ${dockername}:17-recent" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:17-recent \ + --target ${dockername}:17-recent || true + +echo "manifest: ${dockername}:recent" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:recent \ + --target ${dockername}:recent || true + +# ----- 18-3.5-alpine3.22 ----- + +echo "manifest: ${dockername}:18beta1-3.5-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5-alpine3.22 \ + --target ${dockername}:18beta1-3.5-alpine3.22 || true + +echo "manifest: ${dockername}:18beta1-3.5.3-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5.3-alpine3.22 \ + --target ${dockername}:18beta1-3.5.3-alpine3.22 || true + +echo "manifest: ${dockername}:18beta1-3.5-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5-alpine \ + --target ${dockername}:18beta1-3.5-alpine || true + +# ----- 18-3.5-bookworm ----- + +echo "manifest: ${dockername}:18beta1-3.5-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5-bookworm \ + --target ${dockername}:18beta1-3.5-bookworm || true + +echo "manifest: ${dockername}:18beta1-3.5.3-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5.3-bookworm \ + --target ${dockername}:18beta1-3.5.3-bookworm || true + +echo "manifest: ${dockername}:18beta1-3.5" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.5 \ + --target ${dockername}:18beta1-3.5 || true + +# ----- 18-3.6-alpine3.22 ----- + +echo "manifest: ${dockername}:18beta1-3.6.0alpha1-alpine3.22" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.6.0alpha1-alpine3.22 \ + --target ${dockername}:18beta1-3.6.0alpha1-alpine3.22 || true + +echo "manifest: ${dockername}:18beta1-3.6.0alpha1-alpine" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-3.6.0alpha1-alpine \ + --target ${dockername}:18beta1-3.6.0alpha1-alpine || true + +# ----- 18-master-bookworm ----- + +echo "manifest: ${dockername}:18beta1-master-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-master-bookworm \ + --target ${dockername}:18beta1-master-bookworm || true + +echo "manifest: ${dockername}:18beta1-master" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-master \ + --target ${dockername}:18beta1-master || true + +# ----- 18-recent-bookworm ----- + +echo "manifest: ${dockername}:18beta1-recent-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-recent-bookworm \ + --target ${dockername}:18beta1-recent-bookworm || true + +echo "manifest: ${dockername}:18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm \ + --target ${dockername}:18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm || true + +echo "manifest: ${dockername}:18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm \ + --target ${dockername}:18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm || true + +echo "manifest: ${dockername}:18beta1-recent" +manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${dockername}-ARCHVARIANT:18beta1-recent \ + --target ${dockername}:18beta1-recent || true diff --git a/tools/setup_local_environment.sh b/tools/setup_local_environment.sh new file mode 100755 index 000000000..df7fc5285 --- /dev/null +++ b/tools/setup_local_environment.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +echo "==============================================" +echo "Docker PostGIS - Local Development Environment Setup" +echo "==============================================" +echo "" + +# Check if running on Ubuntu/Debian +if ! command -v apt-get &> /dev/null; then + echo "Error: This script is designed for Ubuntu/Debian systems with apt-get package manager." + exit 1 +fi + +# Check if Docker is installed +if ! command -v docker &> /dev/null; then + echo "Error: Docker is not installed." + echo "Please install Docker first from: https://docs.docker.com/engine/install/ubuntu/" + exit 1 +fi + +# Check if running as root (not recommended for development) +if [[ $EUID -eq 0 ]]; then + echo "Warning: Running as root is not recommended for development environment setup." + echo "Consider running this script as a regular user with sudo privileges." + read -p "Continue anyway? (y/N): " -r + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi +fi + +echo "Step 1: Updating system packages..." +sudo apt-get update || true + +echo "" +echo "Step 2: Installing system dependencies..." +# Install required system packages (compatible with Ubuntu 20.04-25.04) +sudo apt-get install -y \ + python3 \ + python3-pip \ + python3-venv \ + curl \ + wget \ + jq \ + gawk \ + git \ + make + +echo "" +echo "Step 3: Setting up Python virtual environment..." +# Create virtual environment if it doesn't exist +if [[ ! -d "venv-docker-postgis" ]]; then + python3 -m venv venv-docker-postgis + echo "Created Python virtual environment in ./venv-docker-postgis" +else + echo "Python virtual environment already exists in ./venv-docker-postgis" +fi + +# Activate virtual environment +# shellcheck source=/dev/null +source venv-docker-postgis/bin/activate +echo "Activated Python virtual environment" + +echo "" +echo "Step 4: Installing Python packages..." +# Upgrade pip and install required Python packages +pip3 install --upgrade pip +pip3 install --upgrade lastversion check-jsonschema + +echo "" +echo "Step 5: Installing manifest-tool..." +if ! command -v manifest-tool &> /dev/null; then + ./tools/install_manifest-tool.sh + echo "manifest-tool installed successfully" +else + echo "manifest-tool is already installed" + manifest-tool -v +fi + +echo "" +echo "Step 6: Installing dive tool..." +if [[ ! -f "tools/dive" ]]; then + ./tools/install_dive.sh + echo "dive tool installed successfully" +else + echo "dive tool already exists" + ./tools/dive -v +fi + +echo "" +echo "Step 7: Initializing environment..." +# shellcheck source=/dev/null +source ./tools/environment_init.sh + +echo "" +echo "Step 8: Running version check..." +make check_version + +echo "" +echo "==============================================" +echo "Setup completed successfully!" +echo "==============================================" +echo "" +echo "To use this environment in the future:" +echo " 1. cd $(pwd)" +echo " 2. source venv-docker-postgis/bin/activate" +echo " 3. source ./tools/environment_init.sh" +echo "" +echo "Available commands:" +echo " make build # Build all images" +echo " make test # Test all images" +echo " make lint # Run shellcheck" +echo " ./update.sh # Update all configurations" +echo " ./tools/versions.sh # Check for new versions" +echo "" +echo "For more information, see the Makefile targets:" +echo " make help" +echo "" \ No newline at end of file diff --git a/versions.sh b/tools/versions.sh similarity index 78% rename from versions.sh rename to tools/versions.sh index 1c5b332d9..41ca68906 100755 --- a/versions.sh +++ b/tools/versions.sh @@ -4,6 +4,8 @@ set -Eeuo pipefail # Source environment variables and necessary configurations source tools/environment_init.sh +source tools/cache_helper.sh +[ -f ./versions.json ] # This code derived from: # - URL: https://github.com/docker-library/postgres/blob/master/versions.sh @@ -17,15 +19,15 @@ source tools/environment_init.sh api_preference="github" #api_preference="osgeo" -- not working yet -alpine_variants=" alpine3.19 alpine3.20 " +alpine_variants=" alpine3.21 alpine3.22 " debian_variants=" bullseye bookworm " debian_latest="bookworm" -alpine_latest="alpine3.20" -postgis_latest="3.4" -postgres_latest="16" -postgis_versions="3.0 3.1 3.2 3.3 3.4 3.5" -postgres_versions="11 12 13 14 15 16 17rc1" +alpine_latest="alpine3.22" +postgis_latest="3.5" +postgres_latest="17" +postgis_versions="3.0 3.1 3.2 3.3 3.4 3.5 3.6" +postgres_versions="13 14 15 16 17 18" # MASTER_BRANCH_MODE='flexible'=if you want to use the latest version of the dependencies - automatically # if not set, it will use the locked version, and the checkout hash will be used @@ -58,8 +60,8 @@ declare -A postgisDebPkgNameVersionSuffixes=( declare -A boostVersion=( ["bullseye"]="1.74.0" ["bookworm"]="1.74.0" # 1.81.0 is not yet optimal. The current bookworm packages mixed use of 1.74.0 and 1.81.0 - ["alpine3.19"]="1.82.0" - ["alpine3.20"]="1.82.0" + ["alpine3.21"]="1.82.0" + ["alpine3.22"]="1.82.0" ) # function get_tag_hash() { @@ -72,10 +74,19 @@ function get_tag_hash() { # remove tag/ prefix if exists. version=${version#tags/} - git ls-remote --sort="v:refname" "$repo" refs/tags/"$version"* | - grep -E 'refs/tags/'"$version"'(\^\{\})?$' | - tail -n1 | - awk '{print $1}' + # Cache git ls-remote calls (6 hour TTL) + local cache_key + cache_key="git_tag_hash_${repo//[^a-zA-Z0-9]/_}_$version" + if tagResponse=$(cache_get "$cache_key" 6); then + echo "$tagResponse" + else + tagResponse=$(git ls-remote --sort="v:refname" "$repo" refs/tags/"$version"* | + grep -E 'refs/tags/'"$version"'(\^\{\})?$' | + tail -n1 | + awk '{print $1}') + cache_store "$cache_key" "$tagResponse" + echo "$tagResponse" + fi } # extracts a version number and limits it to up to two segments (digits separated by dots). @@ -114,10 +125,11 @@ function fetch_postgres_docker_versions() { postgres_all_docker_versions="" while true; do local response - response=$(curl --silent "https://registry.hub.docker.com/v2/repositories/library/postgres/tags?page=${page}&page_size=${PAGE_SIZE}") || { + # Try cache first, then API call + if ! response=$(cached_curl "dockerhub_postgres_page_${page}" "https://registry.hub.docker.com/v2/repositories/library/postgres/tags?page=${page}&page_size=${PAGE_SIZE}" 6); then echo "Failed to fetch from registry.hub.docker.com" return 1 - } + fi # Extract tag names from the JSON response local tags @@ -157,38 +169,57 @@ for variant in ${postgres_versions}; do done echo " " -# Check if the github api is limited <= 8 requests; if so, do not continue -if [ "$api_preference" == "github" ]; then - rateLimitRemaining=$(curl -iks https://api.github.com/users/postgis 2>&1 | grep -im1 'X-Ratelimit-Remaining:' | grep -o '[[:digit:]]*') - echo "github rateLimitRemaining = ${rateLimitRemaining}" - echo " " - if [ "${rateLimitRemaining}" -le 8 ]; then - echo - echo " You do not have enough github requests available to continue!" - echo - echo " Without logging - the github api is limited to 60 requests per hour" - echo " see: https://developer.github.com/v3/#rate-limiting " - echo " You can check your remaining requests with :" - echo " curl -sI https://api.github.com/users/postgis | grep x-ratelimit " - echo - echo " ------------------------ " - curl -sI https://api.github.com/users/postgis | grep x-ratelimit - echo - echo " The limit will be reset at :" - curl -sI https://api.github.com/users/postgis | grep x-ratelimit-reset | cut -d' ' -f2 | xargs -I {} date -d @{} + +packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/' + +# Check if we need to fetch git branch HEADs (check cache first) +need_git_calls=false +for git_check in "git_branch_cgal_5.6.x" "git_branch_sfcgal_master" "git_branch_proj_master" "git_branch_gdal_master" "git_branch_geos_main" "git_branch_postgis_master"; do + if ! cache_get "$git_check" 2 >/dev/null; then + need_git_calls=true + break + fi +done + +# Check GitHub rate limit before git ls-remote calls (if needed) +if [ "$need_git_calls" = true ]; then + if ! check_github_rate_limit 10; then # Need ~6 requests for git ls-remote calls exit 1 fi fi -packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/' -cgal5XGitHash="$(git ls-remote https://github.com/CGAL/cgal.git heads/5.6.x-branch | awk '{ print $1}')" -sfcgalGitHash="$(git ls-remote https://gitlab.com/sfcgal/SFCGAL.git heads/master | awk '{ print $1}')" -projGitHash="$(git ls-remote https://github.com/OSGeo/PROJ.git heads/master | awk '{ print $1}')" -gdalGitHash="$(git ls-remote https://github.com/OSGeo/gdal.git refs/heads/master | grep '\srefs/heads/master' | awk '{ print $1}')" -geosGitHash="$(git ls-remote https://github.com/libgeos/geos.git heads/main | awk '{ print $1}')" -postgisGitHash="$(git ls-remote https://github.com/postgis/postgis.git heads/master | awk '{ print $1}')" - -# Function to get the latest version tag and its SHA1 hash +# Cache git branch HEAD hashes (2 hour TTL) +if ! cgal5XGitHash=$(cache_get "git_branch_cgal_5.6.x" 2); then + cgal5XGitHash="$(git ls-remote https://github.com/CGAL/cgal.git heads/5.6.x-branch | awk '{ print $1}')" + cache_store "git_branch_cgal_5.6.x" "$cgal5XGitHash" +fi + +if ! sfcgalGitHash=$(cache_get "git_branch_sfcgal_master" 2); then + sfcgalGitHash="$(git ls-remote https://gitlab.com/sfcgal/SFCGAL.git heads/master | awk '{ print $1}')" + cache_store "git_branch_sfcgal_master" "$sfcgalGitHash" +fi + +if ! projGitHash=$(cache_get "git_branch_proj_master" 2); then + projGitHash="$(git ls-remote https://github.com/OSGeo/PROJ.git heads/master | awk '{ print $1}')" + cache_store "git_branch_proj_master" "$projGitHash" +fi + +if ! gdalGitHash=$(cache_get "git_branch_gdal_master" 2); then + gdalGitHash="$(git ls-remote https://github.com/OSGeo/gdal.git refs/heads/master | grep '\srefs/heads/master' | awk '{ print $1}')" + cache_store "git_branch_gdal_master" "$gdalGitHash" +fi + +if ! geosGitHash=$(cache_get "git_branch_geos_main" 2); then + geosGitHash="$(git ls-remote https://github.com/libgeos/geos.git heads/main | awk '{ print $1}')" + cache_store "git_branch_geos_main" "$geosGitHash" +fi + +if ! postgisGitHash=$(cache_get "git_branch_postgis_master" 2); then + postgisGitHash="$(git ls-remote https://github.com/postgis/postgis.git heads/master | awk '{ print $1}')" + cache_store "git_branch_postgis_master" "$postgisGitHash" +fi + +# Function to get the latest version tag and its SHA1 hash (with caching) get_latest_version_and_hash() { # Argument 1: Repository URL local repo_url="$1" @@ -204,7 +235,39 @@ get_latest_version_and_hash() { # remove tag/ prefix if exists. checkout_lock=${checkout_lock#tags/} + # Save original repo_only for cache key + local original_repo_only="$repo_only" + + # Create cache key based on all parameters + local cache_key="lastversion_${repo_id}_${repo_development}_${original_repo_only}_${checkout_lock}" + cache_key=${cache_key//[^a-zA-Z0-9]/_} + echo "[+] Checking lastversion : $repo_id - $repo_url" + + # Try cache first (6 hour TTL) + if cachedResult=$(cache_get "$cache_key" 6); then + echo " Using cached result for $repo_id" + # Parse cached result: version|sha1 + local cached_version + local cached_sha1 + cached_version=$(echo "$cachedResult" | cut -d'|' -f1) + cached_sha1=$(echo "$cachedResult" | cut -d'|' -f2) + + # Set the variables as the original function would (after repo_only processing) + if [[ "$repo_only" == "norepo" ]]; then + repo_only="" + fi + local var_name="lastversion_${repo_id}${repo_only}" + eval "${var_name}=${cached_version}" + eval "${var_name}_sha1=${cached_sha1}" + + echo " lastversion_${repo_id}${repo_only} = ${cached_version}" + echo " lastversion_${repo_id}${repo_only}_sha1 = ${cached_sha1}" + echo " " + return 0 + fi + + # Cache miss - fetch from API # Fetch the latest version tag using the lastversion command if [[ "${repo_development}" == "pre-releases" ]]; then @@ -246,6 +309,9 @@ get_latest_version_and_hash() { local sha1_value=${!sha1_var_name} echo " lastversion_${repo_id}${repo_only}_sha1 = ${sha1_value}" echo " " + + # Store result in cache: version|sha1 + cache_store "$cache_key" "${last_version}|${sha1_value}" if [ -z "$last_version" ]; then echo "[-] Error: could not get the latest version tag! Stopping!" @@ -258,10 +324,54 @@ get_latest_version_and_hash() { fi } -get_latest_version_and_hash "https://github.com/MobilityDB/MobilityDB" "mobilitydb" releases norepo "" +# Function to get version and hash with optional failure for missing releases +get_latest_version_and_hash_optional() { + local repo_url="$1" + local repo_id="$2" + local repo_development="${3:-}" + local repo_only="${4:-}" + local checkout_lock="${5:-}" + + echo "[+] Checking lastversion (optional): $repo_id - $repo_url" + + # Try to get the version, but don't exit on failure + if [ -z "$repo_only" ]; then + local version_result + version_result=$(lastversion "${repo_development}" --format tag "${repo_url}" 2>/dev/null || echo "") + eval "lastversion_${repo_id}=${version_result}" + else + local version_result + version_result=$(lastversion "${repo_development}" --format tag --only "${repo_only}" "${repo_url}" 2>/dev/null || echo "") + eval "lastversion_${repo_id}${repo_only}=${version_result}" + fi + + local var_name="lastversion_${repo_id}${repo_only}" + local last_version=${!var_name} + + if [ -n "$last_version" ]; then + # Only get SHA1 if we have a version + eval "lastversion_${repo_id}${repo_only}_sha1=$(get_tag_hash "${repo_url}" "${last_version}" 2>/dev/null || echo "")" + local sha1_var_name="lastversion_${repo_id}${repo_only}_sha1" + local sha1_value=${!sha1_var_name} + echo " lastversion_${repo_id}${repo_only} = ${last_version}" + echo " lastversion_${repo_id}${repo_only}_sha1 = ${sha1_value}" + else + # Set empty values for missing releases + eval "lastversion_${repo_id}${repo_only}=" + eval "lastversion_${repo_id}${repo_only}_sha1=" + echo " lastversion_${repo_id}${repo_only} = (not found - optional)" + echo " lastversion_${repo_id}${repo_only}_sha1 = (not found - optional)" + fi + echo " " +} + +# Check GitHub rate limit before making multiple lastversion calls +if ! check_github_rate_limit 10; then # Reduced from 25 - most calls are now cached + exit 1 +fi + get_latest_version_and_hash "https://github.com/pramsey/pgsql-http" "pgsql_http" releases norepo "" get_latest_version_and_hash "https://github.com/pramsey/pgsql-gzip" "pgsql_gzip" releases norepo "" -get_latest_version_and_hash "https://github.com/timescale/timescaledb" "timescaledb" releases norepo "" get_latest_version_and_hash "https://github.com/duckdb/duckdb" "duckdb" releases norepo "" get_latest_version_and_hash "https://github.com/postgis/postgis" "postgis" releases norepo "" @@ -271,6 +381,11 @@ get_latest_version_and_hash "https://github.com/OSGeo/gdal" "gdal" releases nore get_latest_version_and_hash "https://github.com/OSGeo/PROJ" "proj" releases norepo "${PROJ_CHECKOUT_LOCK}" get_latest_version_and_hash "https://gitlab.com/sfcgal/SFCGAL" "sfcgal" releases norepo "${SFCGAL_CHECKOUT_LOCK}" +get_latest_version_and_hash_optional "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL18 "" +get_latest_version_and_hash_optional "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL20 "" +get_latest_version_and_hash_optional "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL19 "" +get_latest_version_and_hash_optional "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL17 "" +get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL17 "" get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL16 "" get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL15 "" get_latest_version_and_hash "https://github.com/ossc-db/pg_hint_plan" "pg_hint_plan" releases REL14 "" @@ -288,10 +403,11 @@ function fetch_postgis_versions() { while true; do local response if [ "$api_preference" == "github" ]; then - response=$(curl --silent "https://api.github.com/repos/$REPO/tags?per_page=$PER_PAGE&page=$page") || { + # Try cache first, then API call + if ! response=$(cached_curl "github_postgis_tags_page_${page}" "https://api.github.com/repos/$REPO/tags?per_page=$PER_PAGE&page=$page" 6); then echo "Failed to fetch postgis_versions from api.github.com/repos/$REPO/tags" return 1 - } + fi elif [ "$api_preference" == "osgeo" ]; then response=$(curl --silent "https://git.osgeo.org/gitea/api/v1/repos/${REPO}/tags?page=$page&limit=$PER_PAGE") || { echo "Failed to fetch postgis_versions from git.osgeo.org/gitea/api/v1/repos/${REPO}/tags" @@ -327,6 +443,13 @@ function fetch_postgis_versions() { done } +# Check GitHub rate limit before fetching PostGIS versions +if [ "$api_preference" == "github" ]; then + if ! check_github_rate_limit 8; then # Reduced from 15 - PostGIS pages are cached + exit 1 + fi +fi + fetch_postgis_versions || { echo "Error fetching postgis versions! Maybe network or server error!" exit 1 @@ -366,7 +489,17 @@ for variant in ${postgis_versions}; do postgisSrcSha1[$variant]="" else if [ "$api_preference" == "github" ]; then - postgisSrcSha256[$variant]="$(curl -sSL "https://github.com/postgis/postgis/archive/${postgisLastTags[$variant]}.tar.gz" | sha256sum | awk '{ print $1 }')" + # Cache PostGIS SHA256 hash (cache the computed hash, not the binary file) + cache_key="postgis_sha256_${postgisLastTags[$variant]}" + if cached_sha256=$(cache_get "$cache_key" 168); then # 7 days TTL for SHA256 hashes + postgisSrcSha256[$variant]="$cached_sha256" + echo "# PostGIS SHA256 cache hit: ${postgisLastTags[$variant]} = $cached_sha256" + else + echo "# Computing PostGIS SHA256 for ${postgisLastTags[$variant]}..." + postgisSrcSha256[$variant]="$(curl -sSL "https://github.com/postgis/postgis/archive/${postgisLastTags[$variant]}.tar.gz" | sha256sum | awk '{ print $1 }')" + cache_store "$cache_key" "${postgisSrcSha256[$variant]}" + echo "# PostGIS SHA256 computed and cached: ${postgisLastTags[$variant]} = ${postgisSrcSha256[$variant]}" + fi postgisSrcSha1[$variant]=$(get_tag_hash https://github.com/postgis/postgis.git "${postgisLastTags[$variant]}") elif [ "$api_preference" == "osgeo" ]; then postgisSrcSha256[$variant]="$(curl -sSL "https://git.osgeo.org/gitea/postgis/postgis/archive/${postgisLastTags[$variant]}.tar.gz" | sha256sum | awk '{ print $1 }')" @@ -376,7 +509,7 @@ for variant in ${postgis_versions}; do echo "postgisSrcSha1[$variant]=${postgisSrcSha1[$variant]}" done -cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" +#cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" versions=("$@") if [ ${#versions[@]} -eq 0 ]; then versions=() @@ -409,7 +542,7 @@ for version in "${versions[@]}"; do IFS=- read -r postgresVersion postgisVersion bundleType <<<"$version" echo " " - echo "---- generate Dockerfile for $version ----" + echo "---- generate metadata for $version ----" echo "postgresVersion=$postgresVersion" echo "postgisVersion=$postgisVersion" echo "bundleType=$bundleType" @@ -674,25 +807,22 @@ for version in "${versions[@]}"; do printf " template: '%s'\n" "Dockerfile.${bundleType}.template" printf " initfile: '%s'\n" "initdb-${bundleType}.sh" - printf " MOBILITYDB_CHECKOUT: 'tags/%s'\n" "$lastversion_mobilitydb" - printf " MOBILITYDB_CHECKOUT_SHA1: '%s'\n" "$lastversion_mobilitydb_sha1" - printf " PGSQL_HTTP_CHECKOUT: 'tags/%s'\n" "$lastversion_pgsql_http" printf " PGSQL_HTTP_CHECKOUT_SHA1: '%s'\n" "$lastversion_pgsql_http_sha1" printf " PGSQL_GZIP_CHECKOUT: 'tags/%s'\n" "$lastversion_pgsql_gzip" printf " PGSQL_GZIP_CHECKOUT_SHA1: '%s'\n" "$lastversion_pgsql_gzip_sha1" - printf " TIMESCALEDB_CHECKOUT: 'tags/%s'\n" "$lastversion_timescaledb" - printf " TIMESCALEDB_CHECKOUT_SHA1: '%s'\n" "$lastversion_timescaledb_sha1" - printf " DUCKDB_CHECKOUT: 'tags/%s'\n" "$lastversion_duckdb" printf " DUCKDB_CHECKOUT_SHA1: '%s'\n" "$lastversion_duckdb_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}" + # Only add pg_hint_plan if version exists (for beta PostgreSQL versions) + if [ -n "${!lastversion_pg_hint_plan}" ]; then + 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 fi diff --git a/update-postgis.sh b/update-postgis.sh deleted file mode 100755 index f98abd261..000000000 --- a/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/update.sh b/update.sh index f13d70456..38c4a7e06 100755 --- a/update.sh +++ b/update.sh @@ -2,6 +2,7 @@ set -Eeuo pipefail # Source environment variables and necessary configurations source tools/environment_init.sh +[ -f ./versions.json ] # This code derived from: # - URL: https://github.com/docker-library/postgres/blob/master/versions.sh @@ -13,16 +14,16 @@ cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" echo " " # Generate versions.json metadata file -./versions.sh "$@" +./tools/versions.sh "$@" # apply version.json - generate Dockerfiles -./apply-templates.sh "$@" +./tools/apply-templates.sh "$@" # apply version.json - generate .github/workflows/main.yml and .circleci/config.yml -./apply-ci.sh "$@" +./tools/apply-ci.sh "$@" # apply version.json - generate manifest.sh -./apply-manifest.sh "$@" +./tools/apply-manifest.sh "$@" # apply version.json - generate README.md -./apply-readme.sh "$@" +./tools/apply-readme.sh "$@" diff --git a/versions.json b/versions.json index 42f9d35d2..432be3c1f 100644 --- a/versions.json +++ b/versions.json @@ -1,124 +1,54 @@ { - "12-3.3": { - "alpine3.20": { - "tags": "12-3.3-alpine3.20 12-3.3.7-alpine3.20 12-3.3-alpine", - "readme_group": "alpine3.20", + "13-3.3": { + "alpine3.21": { + "tags": "13-3.3-alpine3.21 13-3.3.8-alpine3.21", + "readme_group": "alpine3.21", "postgis": "3.3", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "POSTGIS_VERSION": "3.3.7", - "POSTGIS_SHA256": "faa796035df95e1dac5a92ebe7090b2865d36128cdf6feb36643914f8056ad80", - "POSTGIS_CHECKOUT": "tags/3.3.7", - "POSTGIS_CHECKOUT_SHA1": "a0c796766cbcd369d871283f559fd97a186464dd" + "PG_MAJOR": "13", + "PG_DOCKER": "13", + "POSTGIS_VERSION": "3.3.8", + "POSTGIS_SHA256": "162d6eb3379eac80e4cd1068a6f36bc7fd1d9a32a68beca4386e7da88770ca70", + "POSTGIS_CHECKOUT": "tags/3.3.8", + "POSTGIS_CHECKOUT_SHA1": "cfb70d6229096d2474d79d097768dd19ef04a840" } }, - "12-3.4": { - "bullseye": { - "tags": "12-3.4-bullseye 12-3.4.2-bullseye", - "postgis": "3.4", - "readme_group": "bullseye", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "arch": "amd64 arm64", - "template": "Dockerfile.debian.template", - "initfile": "initdb-postgis.sh", - "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg110+1" - }, - "bookworm": { - "tags": "12-3.4-bookworm 12-3.4.2-bookworm 12-3.4", - "postgis": "3.4", - "readme_group": "bookworm", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "arch": "amd64 arm64", - "template": "Dockerfile.debian.template", - "initfile": "initdb-postgis.sh", - "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" - }, - "alpine3.19": { - "tags": "12-3.4-alpine3.19 12-3.4.3-alpine3.19", - "readme_group": "alpine3.19", + "13-3.4": { + "alpine3.21": { + "tags": "13-3.4-alpine3.21 13-3.4.4-alpine3.21", + "readme_group": "alpine3.21", "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "PG_MAJOR": "13", + "PG_DOCKER": "13", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" }, - "alpine3.20": { - "tags": "12-3.4-alpine3.20 12-3.4.3-alpine3.20 12-3.4-alpine", - "readme_group": "alpine3.20", + "alpine3.22": { + "tags": "13-3.4-alpine3.22 13-3.4.4-alpine3.22 13-3.4-alpine", + "readme_group": "alpine3.22", "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" - } - }, - "12-3.5": { - "alpine3.19": { - "tags": "12-3.5.0rc1-alpine3.19", - "readme_group": "test", - "postgis": "3.5.0rc1", - "arch": "amd64 arm64", - "template": "Dockerfile.alpine.template", - "initfile": "initdb-postgis.sh", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - }, - "alpine3.20": { - "tags": "12-3.5.0rc1-alpine3.20 12-3.5.0rc1-alpine", - "readme_group": "test", - "postgis": "3.5.0rc1", - "arch": "amd64 arm64", - "template": "Dockerfile.alpine.template", - "initfile": "initdb-postgis.sh", - "PG_MAJOR": "12", - "PG_DOCKER": "12", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - } - }, - "13-3.3": { - "alpine3.20": { - "tags": "13-3.3-alpine3.20 13-3.3.7-alpine3.20 13-3.3-alpine", - "readme_group": "alpine3.20", - "postgis": "3.3", - "arch": "amd64 arm64", - "template": "Dockerfile.alpine.template", - "initfile": "initdb-postgis.sh", "PG_MAJOR": "13", "PG_DOCKER": "13", - "POSTGIS_VERSION": "3.3.7", - "POSTGIS_SHA256": "faa796035df95e1dac5a92ebe7090b2865d36128cdf6feb36643914f8056ad80", - "POSTGIS_CHECKOUT": "tags/3.3.7", - "POSTGIS_CHECKOUT_SHA1": "a0c796766cbcd369d871283f559fd97a186464dd" + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" } }, - "13-3.4": { + "13-3.5": { "bullseye": { - "tags": "13-3.4-bullseye 13-3.4.2-bullseye", - "postgis": "3.4", + "tags": "13-3.5-bullseye 13-3.5.2-bullseye", + "postgis": "3.5", "readme_group": "bullseye", "PG_MAJOR": "13", "PG_DOCKER": "13", @@ -126,11 +56,11 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg110+1" + "POSTGIS_VERSION": "3.5.2+dfsg-1.pgdg110+1" }, "bookworm": { - "tags": "13-3.4-bookworm 13-3.4.2-bookworm 13-3.4", - "postgis": "3.4", + "tags": "13-3.5-bookworm 13-3.5.3-bookworm 13-3.5", + "postgis": "3.5", "readme_group": "bookworm", "PG_MAJOR": "13", "PG_DOCKER": "13", @@ -138,87 +68,87 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" }, - "alpine3.19": { - "tags": "13-3.4-alpine3.19 13-3.4.3-alpine3.19", - "readme_group": "alpine3.19", - "postgis": "3.4", + "alpine3.21": { + "tags": "13-3.5-alpine3.21 13-3.5.3-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "13", "PG_DOCKER": "13", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" }, - "alpine3.20": { - "tags": "13-3.4-alpine3.20 13-3.4.3-alpine3.20 13-3.4-alpine", - "readme_group": "alpine3.20", - "postgis": "3.4", + "alpine3.22": { + "tags": "13-3.5-alpine3.22 13-3.5.3-alpine3.22 13-3.5-alpine", + "readme_group": "alpine3.22", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "13", "PG_DOCKER": "13", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" } }, - "13-3.5": { - "alpine3.19": { - "tags": "13-3.5.0rc1-alpine3.19", - "readme_group": "test", - "postgis": "3.5.0rc1", + "14-3.3": { + "alpine3.21": { + "tags": "14-3.3-alpine3.21 14-3.3.8-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.3", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "13", - "PG_DOCKER": "13", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - }, - "alpine3.20": { - "tags": "13-3.5.0rc1-alpine3.20 13-3.5.0rc1-alpine", - "readme_group": "test", - "postgis": "3.5.0rc1", + "PG_MAJOR": "14", + "PG_DOCKER": "14", + "POSTGIS_VERSION": "3.3.8", + "POSTGIS_SHA256": "162d6eb3379eac80e4cd1068a6f36bc7fd1d9a32a68beca4386e7da88770ca70", + "POSTGIS_CHECKOUT": "tags/3.3.8", + "POSTGIS_CHECKOUT_SHA1": "cfb70d6229096d2474d79d097768dd19ef04a840" + } + }, + "14-3.4": { + "alpine3.21": { + "tags": "14-3.4-alpine3.21 14-3.4.4-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "13", - "PG_DOCKER": "13", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - } - }, - "14-3.3": { - "alpine3.20": { - "tags": "14-3.3-alpine3.20 14-3.3.7-alpine3.20 14-3.3-alpine", - "readme_group": "alpine3.20", - "postgis": "3.3", + "PG_MAJOR": "14", + "PG_DOCKER": "14", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" + }, + "alpine3.22": { + "tags": "14-3.4-alpine3.22 14-3.4.4-alpine3.22 14-3.4-alpine", + "readme_group": "alpine3.22", + "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "14", "PG_DOCKER": "14", - "POSTGIS_VERSION": "3.3.7", - "POSTGIS_SHA256": "faa796035df95e1dac5a92ebe7090b2865d36128cdf6feb36643914f8056ad80", - "POSTGIS_CHECKOUT": "tags/3.3.7", - "POSTGIS_CHECKOUT_SHA1": "a0c796766cbcd369d871283f559fd97a186464dd" + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" } }, - "14-3.4": { + "14-3.5": { "bullseye": { - "tags": "14-3.4-bullseye 14-3.4.2-bullseye", - "postgis": "3.4", + "tags": "14-3.5-bullseye 14-3.5.2-bullseye", + "postgis": "3.5", "readme_group": "bullseye", "PG_MAJOR": "14", "PG_DOCKER": "14", @@ -226,11 +156,11 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg110+1" + "POSTGIS_VERSION": "3.5.2+dfsg-1.pgdg110+1" }, "bookworm": { - "tags": "14-3.4-bookworm 14-3.4.2-bookworm 14-3.4", - "postgis": "3.4", + "tags": "14-3.5-bookworm 14-3.5.3-bookworm 14-3.5", + "postgis": "3.5", "readme_group": "bookworm", "PG_MAJOR": "14", "PG_DOCKER": "14", @@ -238,87 +168,87 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" }, - "alpine3.19": { - "tags": "14-3.4-alpine3.19 14-3.4.3-alpine3.19", - "readme_group": "alpine3.19", - "postgis": "3.4", + "alpine3.21": { + "tags": "14-3.5-alpine3.21 14-3.5.3-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "14", "PG_DOCKER": "14", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" }, - "alpine3.20": { - "tags": "14-3.4-alpine3.20 14-3.4.3-alpine3.20 14-3.4-alpine", - "readme_group": "alpine3.20", - "postgis": "3.4", + "alpine3.22": { + "tags": "14-3.5-alpine3.22 14-3.5.3-alpine3.22 14-3.5-alpine", + "readme_group": "alpine3.22", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "14", "PG_DOCKER": "14", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" } }, - "14-3.5": { - "alpine3.19": { - "tags": "14-3.5.0rc1-alpine3.19", - "readme_group": "test", - "postgis": "3.5.0rc1", + "15-3.3": { + "alpine3.21": { + "tags": "15-3.3-alpine3.21 15-3.3.8-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.3", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "14", - "PG_DOCKER": "14", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - }, - "alpine3.20": { - "tags": "14-3.5.0rc1-alpine3.20 14-3.5.0rc1-alpine", - "readme_group": "test", - "postgis": "3.5.0rc1", + "PG_MAJOR": "15", + "PG_DOCKER": "15", + "POSTGIS_VERSION": "3.3.8", + "POSTGIS_SHA256": "162d6eb3379eac80e4cd1068a6f36bc7fd1d9a32a68beca4386e7da88770ca70", + "POSTGIS_CHECKOUT": "tags/3.3.8", + "POSTGIS_CHECKOUT_SHA1": "cfb70d6229096d2474d79d097768dd19ef04a840" + } + }, + "15-3.4": { + "alpine3.21": { + "tags": "15-3.4-alpine3.21 15-3.4.4-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "14", - "PG_DOCKER": "14", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - } - }, - "15-3.3": { - "alpine3.20": { - "tags": "15-3.3-alpine3.20 15-3.3.7-alpine3.20 15-3.3-alpine", - "readme_group": "alpine3.20", - "postgis": "3.3", + "PG_MAJOR": "15", + "PG_DOCKER": "15", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" + }, + "alpine3.22": { + "tags": "15-3.4-alpine3.22 15-3.4.4-alpine3.22 15-3.4-alpine", + "readme_group": "alpine3.22", + "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "15", "PG_DOCKER": "15", - "POSTGIS_VERSION": "3.3.7", - "POSTGIS_SHA256": "faa796035df95e1dac5a92ebe7090b2865d36128cdf6feb36643914f8056ad80", - "POSTGIS_CHECKOUT": "tags/3.3.7", - "POSTGIS_CHECKOUT_SHA1": "a0c796766cbcd369d871283f559fd97a186464dd" + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" } }, - "15-3.4": { + "15-3.5": { "bullseye": { - "tags": "15-3.4-bullseye 15-3.4.2-bullseye", - "postgis": "3.4", + "tags": "15-3.5-bullseye 15-3.5.2-bullseye", + "postgis": "3.5", "readme_group": "bullseye", "PG_MAJOR": "15", "PG_DOCKER": "15", @@ -326,11 +256,11 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg110+1" + "POSTGIS_VERSION": "3.5.2+dfsg-1.pgdg110+1" }, "bookworm": { - "tags": "15-3.4-bookworm 15-3.4.2-bookworm 15-3.4", - "postgis": "3.4", + "tags": "15-3.5-bookworm 15-3.5.3-bookworm 15-3.5", + "postgis": "3.5", "readme_group": "bookworm", "PG_MAJOR": "15", "PG_DOCKER": "15", @@ -338,100 +268,166 @@ "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" }, - "alpine3.19": { - "tags": "15-3.4-alpine3.19 15-3.4.3-alpine3.19", - "readme_group": "alpine3.19", - "postgis": "3.4", + "alpine3.21": { + "tags": "15-3.5-alpine3.21 15-3.5.3-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "15", "PG_DOCKER": "15", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" }, - "alpine3.20": { - "tags": "15-3.4-alpine3.20 15-3.4.3-alpine3.20 15-3.4-alpine", - "readme_group": "alpine3.20", - "postgis": "3.4", + "alpine3.22": { + "tags": "15-3.5-alpine3.22 15-3.5.3-alpine3.22 15-3.5-alpine", + "readme_group": "alpine3.22", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", "PG_MAJOR": "15", "PG_DOCKER": "15", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" } }, - "15-3.4-bundle0": { - "bookworm": { - "tags": "15-3.4-bundle0-bookworm 15-3.4.2-bundle0-bookworm 15-3.4-bundle0", + "16-3.3": { + "alpine3.21": { + "tags": "16-3.3-alpine3.21 16-3.3.8-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.3", + "arch": "amd64 arm64", + "template": "Dockerfile.alpine.template", + "initfile": "initdb-postgis.sh", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "POSTGIS_VERSION": "3.3.8", + "POSTGIS_SHA256": "162d6eb3379eac80e4cd1068a6f36bc7fd1d9a32a68beca4386e7da88770ca70", + "POSTGIS_CHECKOUT": "tags/3.3.8", + "POSTGIS_CHECKOUT_SHA1": "cfb70d6229096d2474d79d097768dd19ef04a840" + } + }, + "16-3.4": { + "alpine3.21": { + "tags": "16-3.4-alpine3.21 16-3.4.4-alpine3.21", + "readme_group": "alpine3.21", "postgis": "3.4", - "readme_group": "bundle0", - "PG_MAJOR": "15", - "PG_DOCKER": "15", "arch": "amd64 arm64", - "template": "Dockerfile.bundle0.template", - "initfile": "initdb-bundle0.sh", - "MOBILITYDB_CHECKOUT": "tags/v1.1.2", - "MOBILITYDB_CHECKOUT_SHA1": "6088e7bc10a31dee34fbc3e3139288a218e4ec65", - "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.16.1", - "TIMESCALEDB_CHECKOUT_SHA1": "7c78574c4d42ec7ceb840bd9d55652182221f251", - "DUCKDB_CHECKOUT": "tags/v1.1.1", - "DUCKDB_CHECKOUT_SHA1": "af39bd0dcf66876e09ac2a7c3baa28fe1b301151", - "PG_HINT_PLAN_CHECKOUT": "tags/REL15_1_5_2", - "PG_HINT_PLAN_CHECKOUT_SHA1": "fabd97bd76361051b91c0e772eb819a45f3fd095", - "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "template": "Dockerfile.alpine.template", + "initfile": "initdb-postgis.sh", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" + }, + "alpine3.22": { + "tags": "16-3.4-alpine3.22 16-3.4.4-alpine3.22 16-3.4-alpine", + "readme_group": "alpine3.22", + "postgis": "3.4", + "arch": "amd64 arm64", + "template": "Dockerfile.alpine.template", + "initfile": "initdb-postgis.sh", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" } }, - "15-3.5": { - "alpine3.19": { - "tags": "15-3.5.0rc1-alpine3.19", - "readme_group": "test", - "postgis": "3.5.0rc1", + "16-3.5": { + "bullseye": { + "tags": "16-3.5-bullseye 16-3.5.2-bullseye", + "postgis": "3.5", + "readme_group": "bullseye", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "arch": "amd64 arm64", + "template": "Dockerfile.debian.template", + "initfile": "initdb-postgis.sh", + "POSTGIS_MAJOR": "3", + "POSTGIS_VERSION": "3.5.2+dfsg-1.pgdg110+1" + }, + "bookworm": { + "tags": "16-3.5-bookworm 16-3.5.3-bookworm 16-3.5", + "postgis": "3.5", + "readme_group": "bookworm", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "arch": "amd64 arm64", + "template": "Dockerfile.debian.template", + "initfile": "initdb-postgis.sh", + "POSTGIS_MAJOR": "3", + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" + }, + "alpine3.21": { + "tags": "16-3.5-alpine3.21 16-3.5.3-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "15", - "PG_DOCKER": "15", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" }, - "alpine3.20": { - "tags": "15-3.5.0rc1-alpine3.20 15-3.5.0rc1-alpine", - "readme_group": "test", - "postgis": "3.5.0rc1", + "alpine3.22": { + "tags": "16-3.5-alpine3.22 16-3.5.3-alpine3.22 16-3.5-alpine", + "readme_group": "alpine3.22", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "15", - "PG_DOCKER": "15", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" } }, - "15-master": { + "16-3.5-bundle0": { "bookworm": { - "tags": "15-master-bookworm 15-master", + "tags": "16-3.5-bundle0-bookworm 16-3.5.3-bundle0-bookworm 16-3.5-bundle0", + "postgis": "3.5", + "readme_group": "bundle0", + "PG_MAJOR": "16", + "PG_DOCKER": "16", + "arch": "amd64 arm64", + "template": "Dockerfile.bundle0.template", + "initfile": "initdb-bundle0.sh", + "PGSQL_HTTP_CHECKOUT": "tags/v1.6.3", + "PGSQL_HTTP_CHECKOUT_SHA1": "865e72b328050bc8d1bf8bd2f982edb7a4eb4e26", + "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", + "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", + "DUCKDB_CHECKOUT": "tags/v1.3.1", + "DUCKDB_CHECKOUT_SHA1": "2063dda3e6bd955c364ce8e61939c6248a907be6", + "PG_HINT_PLAN_CHECKOUT": "tags/REL16_1_6_1", + "PG_HINT_PLAN_CHECKOUT_SHA1": "54b4b0358a6c96dc80b2b836bba50937415753b6", + "POSTGIS_MAJOR": "3", + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" + } + }, + "16-master": { + "bookworm": { + "tags": "16-master-bookworm 16-master", "postgis": "master", "readme_group": "test", - "PG_MAJOR": "15", - "PG_DOCKER": "15", + "PG_MAJOR": "16", + "PG_DOCKER": "16", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", @@ -451,165 +447,161 @@ "BOOST_VERSION": "1.74.0" } }, - "15-recent": { + "16-recent": { "bookworm": { - "tags": "15-recent-bookworm 15-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 15-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 15-recent", + "tags": "16-recent-bookworm 16-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 16-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 16-recent", "postgis": "recent", "readme_group": "recent", - "PG_MAJOR": "15", - "PG_DOCKER": "15", + "PG_MAJOR": "16", + "PG_DOCKER": "16", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf", - "PROJ_CHECKOUT": "tags/9.5.0", - "PROJ_CHECKOUT_SHA1": "0a407325fbb5bf42407a7dc5d4f948be9707e302", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91", + "PROJ_CHECKOUT": "tags/9.6.2", + "PROJ_CHECKOUT_SHA1": "7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54", "GDAL_BUILD": "with_extra", - "GDAL_CHECKOUT": "tags/v3.9.2", - "GDAL_CHECKOUT_SHA1": "3aae5b4cf30c958ab339157b4f8115922e2f2562", - "GEOS_CHECKOUT": "tags/3.13.0", - "GEOS_CHECKOUT_SHA1": "d7957246c588aa9c690efe67924fd70e741a06ab", - "SFCGAL_CHECKOUT": "tags/v1.5.2", - "SFCGAL_CHECKOUT_SHA1": "5584600ad7ed512f158b297476f57ed5fcf9c8dc", - "CGAL_CHECKOUT": "tags/v5.6.1", - "CGAL_CHECKOUT_SHA1": "188e51bad36ffc30e49dbabda29620b71a84664c", + "GDAL_CHECKOUT": "tags/v3.11.1", + "GDAL_CHECKOUT_SHA1": "226b7732b4672deaf35d6a16a39216047358f7d8", + "GEOS_CHECKOUT": "tags/3.13.1", + "GEOS_CHECKOUT_SHA1": "431568d6e311e0bbfb057b4ec3d44d0d3ba3335f", + "SFCGAL_CHECKOUT": "tags/v2.1.0", + "SFCGAL_CHECKOUT_SHA1": "60573cfb6b3fc01eceda563d275a226317ba01db", + "CGAL_CHECKOUT": "tags/v6.0.1", + "CGAL_CHECKOUT_SHA1": "50cfbde3b84dbeae8338268db2d78fe4fcb522de", "BOOST_VERSION": "1.74.0" } }, - "16-3.3": { - "alpine3.20": { - "tags": "16-3.3-alpine3.20 16-3.3.7-alpine3.20 16-3.3-alpine", - "readme_group": "alpine3.20", - "postgis": "3.3", + "17-3.4": { + "alpine3.21": { + "tags": "17-3.4-alpine3.21 17-3.4.4-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.4", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "16", - "PG_DOCKER": "16", - "POSTGIS_VERSION": "3.3.7", - "POSTGIS_SHA256": "faa796035df95e1dac5a92ebe7090b2865d36128cdf6feb36643914f8056ad80", - "POSTGIS_CHECKOUT": "tags/3.3.7", - "POSTGIS_CHECKOUT_SHA1": "a0c796766cbcd369d871283f559fd97a186464dd" + "PG_MAJOR": "17", + "PG_DOCKER": "17", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" + }, + "alpine3.22": { + "tags": "17-3.4-alpine3.22 17-3.4.4-alpine3.22 17-3.4-alpine", + "readme_group": "alpine3.22", + "postgis": "3.4", + "arch": "amd64 arm64", + "template": "Dockerfile.alpine.template", + "initfile": "initdb-postgis.sh", + "PG_MAJOR": "17", + "PG_DOCKER": "17", + "POSTGIS_VERSION": "3.4.4", + "POSTGIS_SHA256": "e4a95ee95e675c70c21f1a96438a4cbd2c54d4e3ddd0d4ee2850c00624211f42", + "POSTGIS_CHECKOUT": "tags/3.4.4", + "POSTGIS_CHECKOUT_SHA1": "e5ae0d451ef9ad3abc5c1c4ef43f9c149c05fd9d" } }, - "16-3.4": { + "17-3.5": { "bullseye": { - "tags": "16-3.4-bullseye 16-3.4.2-bullseye", - "postgis": "3.4", + "tags": "17-3.5-bullseye 17-3.5.2-bullseye", + "postgis": "3.5", "readme_group": "bullseye", - "PG_MAJOR": "16", - "PG_DOCKER": "16", + "PG_MAJOR": "17", + "PG_DOCKER": "17", "arch": "amd64 arm64", "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg110+1" + "POSTGIS_VERSION": "3.5.2+dfsg-1.pgdg110+1" }, "bookworm": { - "tags": "16-3.4-bookworm 16-3.4.2-bookworm 16-3.4 latest", - "postgis": "3.4", + "tags": "17-3.5-bookworm 17-3.5.3-bookworm 17-3.5 latest", + "postgis": "3.5", "readme_group": "bookworm", - "PG_MAJOR": "16", - "PG_DOCKER": "16", + "PG_MAJOR": "17", + "PG_DOCKER": "17", "arch": "amd64 arm64", "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" }, - "alpine3.19": { - "tags": "16-3.4-alpine3.19 16-3.4.3-alpine3.19", - "readme_group": "alpine3.19", - "postgis": "3.4", + "alpine3.21": { + "tags": "17-3.5-alpine3.21 17-3.5.3-alpine3.21", + "readme_group": "alpine3.21", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "16", - "PG_DOCKER": "16", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "PG_MAJOR": "17", + "PG_DOCKER": "17", + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" }, - "alpine3.20": { - "tags": "16-3.4-alpine3.20 16-3.4.3-alpine3.20 16-3.4-alpine alpine", - "readme_group": "alpine3.20", - "postgis": "3.4", + "alpine3.22": { + "tags": "17-3.5-alpine3.22 17-3.5.3-alpine3.22 17-3.5-alpine alpine", + "readme_group": "alpine3.22", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "16", - "PG_DOCKER": "16", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" + "PG_MAJOR": "17", + "PG_DOCKER": "17", + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" } }, - "16-3.4-bundle0": { + "17-3.5-bundle0": { "bookworm": { - "tags": "16-3.4-bundle0-bookworm 16-3.4.2-bundle0-bookworm 16-3.4-bundle0 bundle0", - "postgis": "3.4", + "tags": "17-3.5-bundle0-bookworm 17-3.5.3-bundle0-bookworm 17-3.5-bundle0 bundle0", + "postgis": "3.5", "readme_group": "bundle0", - "PG_MAJOR": "16", - "PG_DOCKER": "16", + "PG_MAJOR": "17", + "PG_DOCKER": "17", "arch": "amd64 arm64", "template": "Dockerfile.bundle0.template", "initfile": "initdb-bundle0.sh", - "MOBILITYDB_CHECKOUT": "tags/v1.1.2", - "MOBILITYDB_CHECKOUT_SHA1": "6088e7bc10a31dee34fbc3e3139288a218e4ec65", - "PGSQL_HTTP_CHECKOUT": "tags/v1.6.0", - "PGSQL_HTTP_CHECKOUT_SHA1": "d0ca28df6121f10cd3868744d219904c7923c5be", + "PGSQL_HTTP_CHECKOUT": "tags/v1.6.3", + "PGSQL_HTTP_CHECKOUT_SHA1": "865e72b328050bc8d1bf8bd2f982edb7a4eb4e26", "PGSQL_GZIP_CHECKOUT": "tags/v1.0.0", "PGSQL_GZIP_CHECKOUT_SHA1": "7c26e8b0056631ec0bb7c8fdd9bf2a24076e4a49", - "TIMESCALEDB_CHECKOUT": "tags/2.16.1", - "TIMESCALEDB_CHECKOUT_SHA1": "7c78574c4d42ec7ceb840bd9d55652182221f251", - "DUCKDB_CHECKOUT": "tags/v1.1.1", - "DUCKDB_CHECKOUT_SHA1": "af39bd0dcf66876e09ac2a7c3baa28fe1b301151", - "PG_HINT_PLAN_CHECKOUT": "tags/REL16_1_6_1", - "PG_HINT_PLAN_CHECKOUT_SHA1": "54b4b0358a6c96dc80b2b836bba50937415753b6", + "DUCKDB_CHECKOUT": "tags/v1.3.1", + "DUCKDB_CHECKOUT_SHA1": "2063dda3e6bd955c364ce8e61939c6248a907be6", + "PG_HINT_PLAN_CHECKOUT": "tags/REL17_1_7_0", + "PG_HINT_PLAN_CHECKOUT_SHA1": "85e07af6ca4675a26fa2281370c37371b883b2a9", "POSTGIS_MAJOR": "3", - "POSTGIS_VERSION": "3.4.2+dfsg-1.pgdg120+1" + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" } }, - "16-3.5": { - "alpine3.19": { - "tags": "16-3.5.0rc1-alpine3.19", - "readme_group": "test", - "postgis": "3.5.0rc1", - "arch": "amd64 arm64", - "template": "Dockerfile.alpine.template", - "initfile": "initdb-postgis.sh", - "PG_MAJOR": "16", - "PG_DOCKER": "16", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - }, - "alpine3.20": { - "tags": "16-3.5.0rc1-alpine3.20 16-3.5.0rc1-alpine", + "17-3.6": { + "alpine3.22": { + "tags": "17-3.6.0alpha1-alpine3.22 17-3.6.0alpha1-alpine", "readme_group": "test", - "postgis": "3.5.0rc1", + "postgis": "3.6.0alpha1", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "16", - "PG_DOCKER": "16", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" + "PG_MAJOR": "17", + "PG_DOCKER": "17", + "POSTGIS_VERSION": "3.6.0alpha1", + "POSTGIS_SHA256": "9f1981716001afff2e4ec75e4107cb64e8d3d9d26ad2abf573444038db0830eb", + "POSTGIS_CHECKOUT": "tags/3.6.0alpha1", + "POSTGIS_CHECKOUT_SHA1": "b32829d707ef65515df1224361b9f2d5889db348" } }, - "16-master": { + "17-master": { "bookworm": { - "tags": "16-master-bookworm 16-master", + "tags": "17-master-bookworm 17-master", "postgis": "master", "readme_group": "test", - "PG_MAJOR": "16", - "PG_DOCKER": "16", + "PG_MAJOR": "17", + "PG_DOCKER": "17", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", @@ -629,85 +621,83 @@ "BOOST_VERSION": "1.74.0" } }, - "16-recent": { + "17-recent": { "bookworm": { - "tags": "16-recent-bookworm 16-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 16-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 16-recent recent", + "tags": "17-recent-bookworm 17-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 17-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 17-recent recent", "postgis": "recent", "readme_group": "recent", - "PG_MAJOR": "16", - "PG_DOCKER": "16", + "PG_MAJOR": "17", + "PG_DOCKER": "17", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf", - "PROJ_CHECKOUT": "tags/9.5.0", - "PROJ_CHECKOUT_SHA1": "0a407325fbb5bf42407a7dc5d4f948be9707e302", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91", + "PROJ_CHECKOUT": "tags/9.6.2", + "PROJ_CHECKOUT_SHA1": "7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54", "GDAL_BUILD": "with_extra", - "GDAL_CHECKOUT": "tags/v3.9.2", - "GDAL_CHECKOUT_SHA1": "3aae5b4cf30c958ab339157b4f8115922e2f2562", - "GEOS_CHECKOUT": "tags/3.13.0", - "GEOS_CHECKOUT_SHA1": "d7957246c588aa9c690efe67924fd70e741a06ab", - "SFCGAL_CHECKOUT": "tags/v1.5.2", - "SFCGAL_CHECKOUT_SHA1": "5584600ad7ed512f158b297476f57ed5fcf9c8dc", - "CGAL_CHECKOUT": "tags/v5.6.1", - "CGAL_CHECKOUT_SHA1": "188e51bad36ffc30e49dbabda29620b71a84664c", + "GDAL_CHECKOUT": "tags/v3.11.1", + "GDAL_CHECKOUT_SHA1": "226b7732b4672deaf35d6a16a39216047358f7d8", + "GEOS_CHECKOUT": "tags/3.13.1", + "GEOS_CHECKOUT_SHA1": "431568d6e311e0bbfb057b4ec3d44d0d3ba3335f", + "SFCGAL_CHECKOUT": "tags/v2.1.0", + "SFCGAL_CHECKOUT_SHA1": "60573cfb6b3fc01eceda563d275a226317ba01db", + "CGAL_CHECKOUT": "tags/v6.0.1", + "CGAL_CHECKOUT_SHA1": "50cfbde3b84dbeae8338268db2d78fe4fcb522de", "BOOST_VERSION": "1.74.0" } }, - "17rc1-3.4": { - "alpine3.20": { - "tags": "17rc1-3.4-alpine3.20 17rc1-3.4.3-alpine3.20 17rc1-3.4-alpine", + "18-3.5": { + "bookworm": { + "tags": "18beta1-3.5-bookworm 18beta1-3.5.3-bookworm 18beta1-3.5", + "postgis": "3.5", "readme_group": "test", - "postgis": "3.4", + "PG_MAJOR": "18", + "PG_DOCKER": "18beta1", "arch": "amd64 arm64", - "template": "Dockerfile.alpine.template", + "template": "Dockerfile.debian.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "17rc1", - "PG_DOCKER": "17rc1", - "POSTGIS_VERSION": "3.4.3", - "POSTGIS_SHA256": "802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf" - } - }, - "17rc1-3.5": { - "alpine3.19": { - "tags": "17rc1-3.5.0rc1-alpine3.19", + "POSTGIS_MAJOR": "3", + "POSTGIS_VERSION": "3.5.3+dfsg-1~exp1.pgdg120+1" + }, + "alpine3.22": { + "tags": "18beta1-3.5-alpine3.22 18beta1-3.5.3-alpine3.22 18beta1-3.5-alpine", "readme_group": "test", - "postgis": "3.5.0rc1", + "postgis": "3.5", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "17rc1", - "PG_DOCKER": "17rc1", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" - }, - "alpine3.20": { - "tags": "17rc1-3.5.0rc1-alpine3.20 17rc1-3.5.0rc1-alpine", + "PG_MAJOR": "18", + "PG_DOCKER": "18beta1", + "POSTGIS_VERSION": "3.5.3", + "POSTGIS_SHA256": "44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91" + } + }, + "18-3.6": { + "alpine3.22": { + "tags": "18beta1-3.6.0alpha1-alpine3.22 18beta1-3.6.0alpha1-alpine", "readme_group": "test", - "postgis": "3.5.0rc1", + "postgis": "3.6.0alpha1", "arch": "amd64 arm64", "template": "Dockerfile.alpine.template", "initfile": "initdb-postgis.sh", - "PG_MAJOR": "17rc1", - "PG_DOCKER": "17rc1", - "POSTGIS_VERSION": "3.5.0rc1", - "POSTGIS_SHA256": "2b9d9dfaa676dfd21b0482be3127d8c573b2b8591c9e1bfffc39a2eea793b806", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072" + "PG_MAJOR": "18", + "PG_DOCKER": "18beta1", + "POSTGIS_VERSION": "3.6.0alpha1", + "POSTGIS_SHA256": "9f1981716001afff2e4ec75e4107cb64e8d3d9d26ad2abf573444038db0830eb", + "POSTGIS_CHECKOUT": "tags/3.6.0alpha1", + "POSTGIS_CHECKOUT_SHA1": "b32829d707ef65515df1224361b9f2d5889db348" } }, - "17rc1-master": { + "18-master": { "bookworm": { - "tags": "17rc1-master-bookworm 17rc1-master", + "tags": "18beta1-master-bookworm 18beta1-master", "postgis": "master", "readme_group": "test", - "PG_MAJOR": "17rc1", - "PG_DOCKER": "17rc1", + "PG_MAJOR": "18", + "PG_DOCKER": "18beta1", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", @@ -727,29 +717,29 @@ "BOOST_VERSION": "1.74.0" } }, - "17rc1-recent": { + "18-recent": { "bookworm": { - "tags": "17rc1-recent-bookworm 17rc1-recent-postgis3.4.3-geos3.13.0-proj9.5.0-gdal3.9.2-cgal5.6.1-sfcgal1.5.2-bookworm 17rc1-recent-postgis3.4-geos3.13-proj9.5-gdal3.9-cgal5.6-sfcgal1.5-bookworm 17rc1-recent", + "tags": "18beta1-recent-bookworm 18beta1-recent-postgis3.5.3-geos3.13.1-proj9.6.2-gdal3.11.1-cgal6.0.1-sfcgal2.1.0-bookworm 18beta1-recent-postgis3.5-geos3.13-proj9.6-gdal3.11-cgal6.0-sfcgal2.1-bookworm 18beta1-recent", "postgis": "recent", "readme_group": "test", - "PG_MAJOR": "17rc1", - "PG_DOCKER": "17rc1", + "PG_MAJOR": "18", + "PG_DOCKER": "18beta1", "arch": "amd64 arm64", "template": "Dockerfile.master.template", "initfile": "initdb-postgis.sh", - "POSTGIS_CHECKOUT": "tags/3.4.3", - "POSTGIS_CHECKOUT_SHA1": "e36594574671877ca6178c944e6d430f87f310bf", - "PROJ_CHECKOUT": "tags/9.5.0", - "PROJ_CHECKOUT_SHA1": "0a407325fbb5bf42407a7dc5d4f948be9707e302", + "POSTGIS_CHECKOUT": "tags/3.5.3", + "POSTGIS_CHECKOUT_SHA1": "aab5f55897aa2e8eb5f17c3996b61268c5f1ec91", + "PROJ_CHECKOUT": "tags/9.6.2", + "PROJ_CHECKOUT_SHA1": "7c3d4a1fa9c1d5a3941b5eaee7c8d149f5936f54", "GDAL_BUILD": "with_extra", - "GDAL_CHECKOUT": "tags/v3.9.2", - "GDAL_CHECKOUT_SHA1": "3aae5b4cf30c958ab339157b4f8115922e2f2562", - "GEOS_CHECKOUT": "tags/3.13.0", - "GEOS_CHECKOUT_SHA1": "d7957246c588aa9c690efe67924fd70e741a06ab", - "SFCGAL_CHECKOUT": "tags/v1.5.2", - "SFCGAL_CHECKOUT_SHA1": "5584600ad7ed512f158b297476f57ed5fcf9c8dc", - "CGAL_CHECKOUT": "tags/v5.6.1", - "CGAL_CHECKOUT_SHA1": "188e51bad36ffc30e49dbabda29620b71a84664c", + "GDAL_CHECKOUT": "tags/v3.11.1", + "GDAL_CHECKOUT_SHA1": "226b7732b4672deaf35d6a16a39216047358f7d8", + "GEOS_CHECKOUT": "tags/3.13.1", + "GEOS_CHECKOUT_SHA1": "431568d6e311e0bbfb057b4ec3d44d0d3ba3335f", + "SFCGAL_CHECKOUT": "tags/v2.1.0", + "SFCGAL_CHECKOUT_SHA1": "60573cfb6b3fc01eceda563d275a226317ba01db", + "CGAL_CHECKOUT": "tags/v6.0.1", + "CGAL_CHECKOUT_SHA1": "50cfbde3b84dbeae8338268db2d78fe4fcb522de", "BOOST_VERSION": "1.74.0" } }, @@ -779,59 +769,5 @@ "CGAL_CHECKOUT_SHA1": "de4fa0d7d57b5a997012f2804161386ff4bc0d0f", "BOOST_VERSION": "1.74.0" } - }, - "16-l3.5.0rc1": { - "bookworm": { - "_comment": "source: ./locked.yml", - "arch": "amd64 arm64", - "BOOST_VERSION": "1.74.0", - "CGAL_CHECKOUT_SHA1": "188e51bad36ffc30e49dbabda29620b71a84664c", - "CGAL_CHECKOUT": "tags/v5.6.1", - "GDAL_BUILD": "with_extra", - "GDAL_CHECKOUT_SHA1": "3aae5b4cf30c958ab339157b4f8115922e2f2562", - "GDAL_CHECKOUT": "tags/v3.9.2", - "GEOS_CHECKOUT_SHA1": "d7957246c588aa9c690efe67924fd70e741a06ab", - "GEOS_CHECKOUT": "tags/3.13.0", - "initfile": "initdb-postgis.sh", - "PG_DOCKER": "16", - "PG_MAJOR": "16", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "postgis": "l3.5.0rc1", - "PROJ_CHECKOUT_SHA1": "0a407325fbb5bf42407a7dc5d4f948be9707e302", - "PROJ_CHECKOUT": "tags/9.5.0", - "readme_group": "test", - "SFCGAL_CHECKOUT_SHA1": "5584600ad7ed512f158b297476f57ed5fcf9c8dc", - "SFCGAL_CHECKOUT": "tags/v1.5.2", - "tags": "16-l3.5.0rc1-bookworm 16-l3.5.0rc1", - "template": "Dockerfile.master.template" - } - }, - "17rc1-l3.5.0rc1": { - "bookworm": { - "_comment": "source: ./locked.yml", - "arch": "amd64 arm64", - "BOOST_VERSION": "1.74.0", - "CGAL_CHECKOUT_SHA1": "188e51bad36ffc30e49dbabda29620b71a84664c", - "CGAL_CHECKOUT": "tags/v5.6.1", - "GDAL_BUILD": "with_extra", - "GDAL_CHECKOUT_SHA1": "3aae5b4cf30c958ab339157b4f8115922e2f2562", - "GDAL_CHECKOUT": "tags/v3.9.2", - "GEOS_CHECKOUT_SHA1": "d7957246c588aa9c690efe67924fd70e741a06ab", - "GEOS_CHECKOUT": "tags/3.13.0", - "initfile": "initdb-postgis.sh", - "PG_DOCKER": "17rc1", - "PG_MAJOR": "17rc1", - "POSTGIS_CHECKOUT_SHA1": "df9317741170e86ff8346decdd555b54a0432072", - "POSTGIS_CHECKOUT": "tags/3.5.0rc1", - "postgis": "l3.5.0rc1", - "PROJ_CHECKOUT_SHA1": "0a407325fbb5bf42407a7dc5d4f948be9707e302", - "PROJ_CHECKOUT": "tags/9.5.0", - "readme_group": "test", - "SFCGAL_CHECKOUT_SHA1": "5584600ad7ed512f158b297476f57ed5fcf9c8dc", - "SFCGAL_CHECKOUT": "tags/v1.5.2", - "tags": "17rc1-l3.5.0rc1-bookworm 17rc1-l3.5.0rc1", - "template": "Dockerfile.master.template" - } } } diff --git a/versions.schema.json b/versions.schema.json new file mode 100644 index 000000000..1c0743810 --- /dev/null +++ b/versions.schema.json @@ -0,0 +1,98 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "definitions": { + "git_checkout_ref": { + "type": "string", + "pattern": "^(master|main|develop|tags/(((v|V)?[0-9]+(\\.[0-9]+)*([-_]?[a-zA-Z0-9]+)*)|((REL|rel)_?[0-9]+(_[0-9]+)*(_[a-zA-Z0-9]+)*)))$" + }, + "sha1_value": { + "type": "string", + "pattern": "^(nocheck|[0-9a-f]{40})$" + }, + "pg_version": { + "type": "string", + "pattern": "^[0-9]{2}(beta[0-9]+|rc[0-9]+)?$" + }, + "gdal_build_type": { + "type": "string", + "enum": ["with_extra", "minimal"] + }, + "shell_script": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*\\.sh$" + }, + "docker_tags": { + "type": "string", + "pattern": "^(([0-9]{2}(beta[0-9]+|rc[0-9]+)?-[a-zA-Z0-9.-]+(alpha[0-9]+|beta[0-9]+|rc[0-9]+)?|recent|latest|alpine|bundle0)\\s*)+$" + }, + "readme_group_type": { + "type": "string", + "pattern": "^(alpine[0-9.]+|bullseye|bookworm|bundle0|locked|recent|test)$" + }, + "distribution": { + "type": "object", + "required": [ + "tags", + "postgis", + "arch", + "template", + "initfile", + "PG_MAJOR", + "PG_DOCKER", + "readme_group" + ], + "properties": { + "tags": {"$ref": "#/definitions/docker_tags"}, + "postgis": {"type": "string"}, + "readme_group": {"$ref": "#/definitions/readme_group_type"}, + "arch": {"type": "string", "pattern": "^(amd64|arm64|amd64 arm64)$"}, + "template": { + "type": "string", + "enum": [ + "Dockerfile.alpine.template", + "Dockerfile.debian.template", + "Dockerfile.master.template", + "Dockerfile.bundle0.template" + ] + }, + "initfile": {"$ref": "#/definitions/shell_script"}, + "PG_MAJOR": {"$ref": "#/definitions/pg_version"}, + "PG_DOCKER": {"$ref": "#/definitions/pg_version"}, + "GDAL_BUILD": {"$ref": "#/definitions/gdal_build_type"}, + "POSTGIS_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "PROJ_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "GDAL_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "GEOS_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "SFCGAL_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "CGAL_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "PGSQL_HTTP_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "PGSQL_GZIP_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "PG_HINT_PLAN_CHECKOUT": {"$ref": "#/definitions/git_checkout_ref"}, + "POSTGIS_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "PROJ_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "GDAL_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "GEOS_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "SFCGAL_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "CGAL_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "PGSQL_HTTP_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "PGSQL_GZIP_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"}, + "PG_HINT_PLAN_CHECKOUT_SHA1": {"$ref": "#/definitions/sha1_value"} + }, + "patternProperties": { + ".*_CHECKOUT_SHA1$": {"$ref": "#/definitions/sha1_value"} + } + } + }, + "patternProperties": { + "^[0-9]+-[0-9.]+(?:-[a-zA-Z0-9]+)?$": { + "type": "object", + "patternProperties": { + "^(alpine[0-9.]+|bullseye|bookworm)$": { + "$ref": "#/definitions/distribution" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file