diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4458dd6b..2617f734 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: postgres: [12, 13, 14, 15, 16, 17] - postgis: ['3.4'] + postgis: ['3.5'] variant: [default, alpine] include: - postgres: 16 @@ -25,12 +25,6 @@ jobs: - postgres: 17 postgis: master variant: default - - postgres: 16 - postgis: 3.5 - variant: alpine - - postgres: 17 - postgis: 3.5 - variant: alpine name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }} runs-on: ubuntu-20.04 diff --git a/12-3.4/Dockerfile b/12-3.5/Dockerfile similarity index 90% rename from 12-3.4/Dockerfile rename to 12-3.5/Dockerfile index 369d4dd4..903a0543 100644 --- a/12-3.4/Dockerfile +++ b/12-3.5/Dockerfile @@ -5,11 +5,11 @@ FROM postgres:12-bullseye LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 12 bullseye" \ + org.opencontainers.image.description="PostGIS 3.5.0+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.3+dfsg-2.pgdg110+1 +ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/12-3.4/alpine/Dockerfile b/12-3.5/alpine/Dockerfile similarity index 96% rename from 12-3.4/alpine/Dockerfile rename to 12-3.5/alpine/Dockerfile index e48dc1df..053a8632 100644 --- a/12-3.4/alpine/Dockerfile +++ b/12-3.5/alpine/Dockerfile @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:12-alpine3.20 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 12 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 12 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b +ENV POSTGIS_VERSION 3.5.0 +ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/12-3.4/alpine/initdb-postgis.sh b/12-3.5/alpine/initdb-postgis.sh similarity index 100% rename from 12-3.4/alpine/initdb-postgis.sh rename to 12-3.5/alpine/initdb-postgis.sh diff --git a/12-3.4/alpine/update-postgis.sh b/12-3.5/alpine/update-postgis.sh similarity index 100% rename from 12-3.4/alpine/update-postgis.sh rename to 12-3.5/alpine/update-postgis.sh diff --git a/12-3.4/initdb-postgis.sh b/12-3.5/initdb-postgis.sh similarity index 100% rename from 12-3.4/initdb-postgis.sh rename to 12-3.5/initdb-postgis.sh diff --git a/12-3.4/update-postgis.sh b/12-3.5/update-postgis.sh similarity index 100% rename from 12-3.4/update-postgis.sh rename to 12-3.5/update-postgis.sh diff --git a/13-3.4/Dockerfile b/13-3.5/Dockerfile similarity index 90% rename from 13-3.4/Dockerfile rename to 13-3.5/Dockerfile index b2214945..d7764e65 100644 --- a/13-3.4/Dockerfile +++ b/13-3.5/Dockerfile @@ -5,11 +5,11 @@ FROM postgres:13-bullseye LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 13 bullseye" \ + org.opencontainers.image.description="PostGIS 3.5.0+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.3+dfsg-2.pgdg110+1 +ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/13-3.4/alpine/Dockerfile b/13-3.5/alpine/Dockerfile similarity index 96% rename from 13-3.4/alpine/Dockerfile rename to 13-3.5/alpine/Dockerfile index 242ddb4d..2470ada0 100644 --- a/13-3.4/alpine/Dockerfile +++ b/13-3.5/alpine/Dockerfile @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:13-alpine3.20 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 13 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 13 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b +ENV POSTGIS_VERSION 3.5.0 +ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/13-3.4/alpine/initdb-postgis.sh b/13-3.5/alpine/initdb-postgis.sh similarity index 100% rename from 13-3.4/alpine/initdb-postgis.sh rename to 13-3.5/alpine/initdb-postgis.sh diff --git a/13-3.4/alpine/update-postgis.sh b/13-3.5/alpine/update-postgis.sh similarity index 100% rename from 13-3.4/alpine/update-postgis.sh rename to 13-3.5/alpine/update-postgis.sh diff --git a/13-3.4/initdb-postgis.sh b/13-3.5/initdb-postgis.sh similarity index 100% rename from 13-3.4/initdb-postgis.sh rename to 13-3.5/initdb-postgis.sh diff --git a/13-3.4/update-postgis.sh b/13-3.5/update-postgis.sh similarity index 100% rename from 13-3.4/update-postgis.sh rename to 13-3.5/update-postgis.sh diff --git a/14-3.4/Dockerfile b/14-3.5/Dockerfile similarity index 90% rename from 14-3.4/Dockerfile rename to 14-3.5/Dockerfile index c45a2fb9..58f99fda 100644 --- a/14-3.4/Dockerfile +++ b/14-3.5/Dockerfile @@ -5,11 +5,11 @@ FROM postgres:14-bullseye LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 14 bullseye" \ + org.opencontainers.image.description="PostGIS 3.5.0+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.3+dfsg-2.pgdg110+1 +ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/14-3.4/alpine/Dockerfile b/14-3.5/alpine/Dockerfile similarity index 96% rename from 14-3.4/alpine/Dockerfile rename to 14-3.5/alpine/Dockerfile index e2b1ea21..a72967e0 100644 --- a/14-3.4/alpine/Dockerfile +++ b/14-3.5/alpine/Dockerfile @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:14-alpine3.20 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 14 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 14 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b +ENV POSTGIS_VERSION 3.5.0 +ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/14-3.4/alpine/initdb-postgis.sh b/14-3.5/alpine/initdb-postgis.sh similarity index 100% rename from 14-3.4/alpine/initdb-postgis.sh rename to 14-3.5/alpine/initdb-postgis.sh diff --git a/14-3.4/alpine/update-postgis.sh b/14-3.5/alpine/update-postgis.sh similarity index 100% rename from 14-3.4/alpine/update-postgis.sh rename to 14-3.5/alpine/update-postgis.sh diff --git a/14-3.4/initdb-postgis.sh b/14-3.5/initdb-postgis.sh similarity index 100% rename from 14-3.4/initdb-postgis.sh rename to 14-3.5/initdb-postgis.sh diff --git a/14-3.4/update-postgis.sh b/14-3.5/update-postgis.sh similarity index 100% rename from 14-3.4/update-postgis.sh rename to 14-3.5/update-postgis.sh diff --git a/15-3.4/Dockerfile b/15-3.5/Dockerfile similarity index 90% rename from 15-3.4/Dockerfile rename to 15-3.5/Dockerfile index 90c865ad..578013ca 100644 --- a/15-3.4/Dockerfile +++ b/15-3.5/Dockerfile @@ -5,11 +5,11 @@ FROM postgres:15-bullseye LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 15 bullseye" \ + org.opencontainers.image.description="PostGIS 3.5.0+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.3+dfsg-2.pgdg110+1 +ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/15-3.4/alpine/Dockerfile b/15-3.5/alpine/Dockerfile similarity index 96% rename from 15-3.4/alpine/Dockerfile rename to 15-3.5/alpine/Dockerfile index a21354de..b3f15b86 100644 --- a/15-3.4/alpine/Dockerfile +++ b/15-3.5/alpine/Dockerfile @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:15-alpine3.20 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 15 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 15 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b +ENV POSTGIS_VERSION 3.5.0 +ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/15-3.4/alpine/initdb-postgis.sh b/15-3.5/alpine/initdb-postgis.sh similarity index 100% rename from 15-3.4/alpine/initdb-postgis.sh rename to 15-3.5/alpine/initdb-postgis.sh diff --git a/15-3.4/alpine/update-postgis.sh b/15-3.5/alpine/update-postgis.sh similarity index 100% rename from 15-3.4/alpine/update-postgis.sh rename to 15-3.5/alpine/update-postgis.sh diff --git a/15-3.4/initdb-postgis.sh b/15-3.5/initdb-postgis.sh similarity index 100% rename from 15-3.4/initdb-postgis.sh rename to 15-3.5/initdb-postgis.sh diff --git a/15-3.4/update-postgis.sh b/15-3.5/update-postgis.sh similarity index 100% rename from 15-3.4/update-postgis.sh rename to 15-3.5/update-postgis.sh diff --git a/16-3.4/Dockerfile b/16-3.5/16-3.4/Dockerfile similarity index 100% rename from 16-3.4/Dockerfile rename to 16-3.5/16-3.4/Dockerfile diff --git a/16-3.4/alpine/Dockerfile b/16-3.5/16-3.4/alpine/Dockerfile similarity index 100% rename from 16-3.4/alpine/Dockerfile rename to 16-3.5/16-3.4/alpine/Dockerfile diff --git a/16-3.4/alpine/initdb-postgis.sh b/16-3.5/16-3.4/alpine/initdb-postgis.sh similarity index 100% rename from 16-3.4/alpine/initdb-postgis.sh rename to 16-3.5/16-3.4/alpine/initdb-postgis.sh diff --git a/16-3.4/alpine/update-postgis.sh b/16-3.5/16-3.4/alpine/update-postgis.sh similarity index 100% rename from 16-3.4/alpine/update-postgis.sh rename to 16-3.5/16-3.4/alpine/update-postgis.sh diff --git a/16-3.4/initdb-postgis.sh b/16-3.5/16-3.4/initdb-postgis.sh similarity index 100% rename from 16-3.4/initdb-postgis.sh rename to 16-3.5/16-3.4/initdb-postgis.sh diff --git a/16-3.4/update-postgis.sh b/16-3.5/16-3.4/update-postgis.sh similarity index 100% rename from 16-3.4/update-postgis.sh rename to 16-3.5/16-3.4/update-postgis.sh diff --git a/16-3.5/Dockerfile b/16-3.5/Dockerfile index 51881a02..5e9bb1a0 100644 --- a/16-3.5/Dockerfile +++ b/16-3.5/Dockerfile @@ -1,3 +1,28 @@ - # placeholder Dockerfile - # Debian version of postgis is not detected! - # This is an autogenerated message of ./update.sh +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM postgres:16-bullseye + +LABEL maintainer="PostGIS Project - https://postgis.net" \ + org.opencontainers.image.description="PostGIS 3.5.0+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.5.0+dfsg-1.pgdg110+1 + +RUN 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 \ + && 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 + diff --git a/17-3.4/alpine/initdb-postgis.sh b/16-3.5/initdb-postgis.sh similarity index 100% rename from 17-3.4/alpine/initdb-postgis.sh rename to 16-3.5/initdb-postgis.sh diff --git a/17-3.4/alpine/update-postgis.sh b/16-3.5/update-postgis.sh similarity index 100% rename from 17-3.4/alpine/update-postgis.sh rename to 16-3.5/update-postgis.sh diff --git a/16-master/Dockerfile b/16-master/Dockerfile index aaa3ebe9..639bae6a 100644 --- a/16-master/Dockerfile +++ b/16-master/Dockerfile @@ -6,7 +6,7 @@ # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. ARG DOCKER_CMAKE_BUILD_TYPE=Release -ARG CGAL_GIT_BRANCH=5.6.x-branch +ARG CGAL_GIT_BRANCH=master FROM postgres:16-bullseye as builder LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -84,18 +84,16 @@ ARG DOCKER_CMAKE_BUILD_TYPE ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal -# By utilizing the latest commit of the CGAL 5.x.x-branch and implementing a header-only build for SFCGAL, -# one can benefit from the latest CGAL patches while avoiding compatibility issues. ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4 -ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c +ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633 +ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ && git clone --branch ${CGAL_GIT_BRANCH} https://github.com/CGAL/cgal \ && cd cgal \ - && git checkout ${CGAL5X_GIT_HASH} \ + && git checkout ${CGAL_GIT_HASH} \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && git clone https://gitlab.com/SFCGAL/SFCGAL.git \ @@ -122,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991 +ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -152,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb +ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -168,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a +ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -301,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4 -ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c -ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991 -ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb -ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a +ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633 +ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29 +ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4 +ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6 +ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -324,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH b28f00c3efd772460714cb9db30b0dc9a0ff27fd +ENV POSTGIS_GIT_HASH 77bcee79332a82a5b5fc7ae6ae47470939a855fa RUN set -ex \ && apt-get update \ diff --git a/17-3.4/Dockerfile b/17-3.5/17-3.4/Dockerfile similarity index 100% rename from 17-3.4/Dockerfile rename to 17-3.5/17-3.4/Dockerfile diff --git a/17-3.4/alpine/Dockerfile b/17-3.5/17-3.4/alpine/Dockerfile similarity index 100% rename from 17-3.4/alpine/Dockerfile rename to 17-3.5/17-3.4/alpine/Dockerfile diff --git a/17-3.4/initdb-postgis.sh b/17-3.5/17-3.4/alpine/initdb-postgis.sh similarity index 100% rename from 17-3.4/initdb-postgis.sh rename to 17-3.5/17-3.4/alpine/initdb-postgis.sh diff --git a/17-3.4/update-postgis.sh b/17-3.5/17-3.4/alpine/update-postgis.sh similarity index 100% rename from 17-3.4/update-postgis.sh rename to 17-3.5/17-3.4/alpine/update-postgis.sh diff --git a/17-3.5/17-3.4/initdb-postgis.sh b/17-3.5/17-3.4/initdb-postgis.sh new file mode 100644 index 00000000..e38ad7d6 --- /dev/null +++ b/17-3.5/17-3.4/initdb-postgis.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +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/17-3.5/17-3.4/update-postgis.sh b/17-3.5/17-3.4/update-postgis.sh new file mode 100755 index 00000000..f98abd26 --- /dev/null +++ b/17-3.5/17-3.4/update-postgis.sh @@ -0,0 +1,28 @@ +#!/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/17-3.5/Dockerfile b/17-3.5/Dockerfile index 51881a02..9533fd5e 100644 --- a/17-3.5/Dockerfile +++ b/17-3.5/Dockerfile @@ -1,3 +1,28 @@ - # placeholder Dockerfile - # Debian version of postgis is not detected! - # This is an autogenerated message of ./update.sh +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM postgres:17-bullseye + +LABEL maintainer="PostGIS Project - https://postgis.net" \ + org.opencontainers.image.description="PostGIS 3.5.0+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 17 bullseye" \ + org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.5.0+dfsg-1.pgdg110+1 + +RUN 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 \ + && 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 + diff --git a/17-3.5/initdb-postgis.sh b/17-3.5/initdb-postgis.sh new file mode 100644 index 00000000..e38ad7d6 --- /dev/null +++ b/17-3.5/initdb-postgis.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +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/17-3.5/update-postgis.sh b/17-3.5/update-postgis.sh new file mode 100755 index 00000000..f98abd26 --- /dev/null +++ b/17-3.5/update-postgis.sh @@ -0,0 +1,28 @@ +#!/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/17-master/Dockerfile b/17-master/Dockerfile index 77d0f911..a297941e 100644 --- a/17-master/Dockerfile +++ b/17-master/Dockerfile @@ -6,7 +6,7 @@ # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. ARG DOCKER_CMAKE_BUILD_TYPE=Release -ARG CGAL_GIT_BRANCH=5.6.x-branch +ARG CGAL_GIT_BRANCH=master FROM postgres:17-bullseye as builder LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -84,18 +84,16 @@ ARG DOCKER_CMAKE_BUILD_TYPE ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal -# By utilizing the latest commit of the CGAL 5.x.x-branch and implementing a header-only build for SFCGAL, -# one can benefit from the latest CGAL patches while avoiding compatibility issues. ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4 -ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c +ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633 +ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ && git clone --branch ${CGAL_GIT_BRANCH} https://github.com/CGAL/cgal \ && cd cgal \ - && git checkout ${CGAL5X_GIT_HASH} \ + && git checkout ${CGAL_GIT_HASH} \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && git clone https://gitlab.com/SFCGAL/SFCGAL.git \ @@ -122,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991 +ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -152,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb +ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -168,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a +ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -301,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH f1af52edeb741a05f86d959984ed943f25f5fcd4 -ENV SFCGAL_GIT_HASH 88ec10481fc51efb4d232fd2f45bb556120a6f4c -ENV PROJ_GIT_HASH d19ab643b9825bf4de5ff336e228b9abc06e2991 -ENV GEOS_GIT_HASH e142764b77f4b8d0c36ec88406300c5f876743fb -ENV GDAL_GIT_HASH 91bfec36a4dc03cfba554e6197a83099d9ec122a +ENV CGAL_GIT_HASH a98031649b4d9bd61ea2934204b523d0d8a9e633 +ENV SFCGAL_GIT_HASH c92aa736e1f22422b8fd4ac6eba2e041b74d3a29 +ENV PROJ_GIT_HASH 54a7662dbc52963da70303ac8c9124966f4cf6b4 +ENV GEOS_GIT_HASH d7c51c401213d11f5dafd56596295274433379b6 +ENV GDAL_GIT_HASH 014581eece0d174ac283691e855c5f370a73d990 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -324,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH b28f00c3efd772460714cb9db30b0dc9a0ff27fd +ENV POSTGIS_GIT_HASH 77bcee79332a82a5b5fc7ae6ae47470939a855fa RUN set -ex \ && apt-get update \ diff --git a/Dockerfile.master.template b/Dockerfile.master.template index 886c70d4..4736f7f8 100644 --- a/Dockerfile.master.template +++ b/Dockerfile.master.template @@ -6,7 +6,7 @@ # This is a multi-stage Dockerfile, requiring a minimum Docker version of 17.05. ARG DOCKER_CMAKE_BUILD_TYPE=Release -ARG CGAL_GIT_BRANCH=5.6.x-branch +ARG CGAL_GIT_BRANCH=master FROM postgres:%%PG_MAJOR%%-%%DEBIAN_VERSION%% as builder LABEL maintainer="PostGIS Project - https://postgis.net" \ @@ -84,18 +84,16 @@ ARG DOCKER_CMAKE_BUILD_TYPE ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal -# By utilizing the latest commit of the CGAL 5.x.x-branch and implementing a header-only build for SFCGAL, -# one can benefit from the latest CGAL patches while avoiding compatibility issues. ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH %%CGAL5X_GIT_HASH%% +ENV CGAL_GIT_HASH %%CGAL_GIT_HASH%% ENV SFCGAL_GIT_HASH %%SFCGAL_GIT_HASH%% RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ && git clone --branch ${CGAL_GIT_BRANCH} https://github.com/CGAL/cgal \ && cd cgal \ - && git checkout ${CGAL5X_GIT_HASH} \ + && git checkout ${CGAL_GIT_HASH} \ && git log -1 > /_pgis_cgal_last_commit.txt \ && cd /usr/src \ && git clone https://gitlab.com/SFCGAL/SFCGAL.git \ @@ -301,7 +299,7 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL5X_GIT_HASH %%CGAL5X_GIT_HASH%% +ENV CGAL_GIT_HASH %%CGAL_GIT_HASH%% ENV SFCGAL_GIT_HASH %%SFCGAL_GIT_HASH%% ENV PROJ_GIT_HASH %%PROJ_GIT_HASH%% ENV GEOS_GIT_HASH %%GEOS_GIT_HASH%% diff --git a/Makefile b/Makefile index d8e7c674..cb6f6abb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # When processing the rules for tagging and pushing container images with the # "latest" tag, the following variable will be the version that is considered # to be the latest. -LATEST_VERSION=16-3.4 +LATEST_VERSION=17-3.5 # The following flags are set based on VERSION and VARIANT environment variables # that may have been specified, and are used by rules to determine which diff --git a/README.md b/README.md index 4e896869..5be554f5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://github.com/postgis/docker-postgis/workflows/Docker%20PostGIS%20CI/badge.svg)](https://github.com/postgis/docker-postgis/actions) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `postgis/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 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. +The `postgis/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.5.x, which is compatible with PostgreSQL versions 12, 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: @@ -18,11 +18,11 @@ 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-27) +# Versions (2024-10-15) Supported architecture: `amd64` (also known as X86-64)" -Recommended versions for new users are: `postgis/postgis:17-3.4`, `postgis/postgis:16-3.4` +Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postgis:16-3.5` ### Debian based (recommended) @@ -32,14 +32,14 @@ Recommended versions for new users are: `postgis/postgis:17-3.4`, `postgis/postg * In the Debian Bullseye repository, the versions are: geos=3.9, gdal=3.2, proj=7.2, and sfcgal=1.3.9. * This version is easy to extend and has matured over time. - DockerHub image | Dockerfile | OS | Postgres | PostGIS | +| DockerHub image | Dockerfile | OS | Postgres | PostGIS | | --------------- | ---------- | -- | -------- | ------- | -| [postgis/postgis:12-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.4/Dockerfile) | debian:bullseye | 12 | 3.4.3 | -| [postgis/postgis:13-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.4/Dockerfile) | debian:bullseye | 13 | 3.4.3 | -| [postgis/postgis:14-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.4/Dockerfile) | debian:bullseye | 14 | 3.4.3 | -| [postgis/postgis:15-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.4/Dockerfile) | debian:bullseye | 15 | 3.4.3 | -| [postgis/postgis:16-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.4/Dockerfile) | debian:bullseye | 16 | 3.4.3 | -| [postgis/postgis:17-3.4](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.4) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.4/Dockerfile) | debian:bullseye | 17 | 3.4.3 | +| [postgis/postgis:12-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.5/Dockerfile) | debian:bullseye | 12 | 3.5.0 | +| [postgis/postgis:13-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.5/Dockerfile) | debian:bullseye | 13 | 3.5.0 | +| [postgis/postgis:14-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.5/Dockerfile) | debian:bullseye | 14 | 3.5.0 | +| [postgis/postgis:15-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.5/Dockerfile) | debian:bullseye | 15 | 3.5.0 | +| [postgis/postgis:16-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.5/Dockerfile) | debian:bullseye | 16 | 3.5.0 | +| [postgis/postgis:17-3.5](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.5) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.5/Dockerfile) | debian:bullseye | 17 | 3.5.0 | ### Alpine based @@ -49,26 +49,24 @@ Recommended versions for new users are: `postgis/postgis:17-3.4`, `postgis/postg | DockerHub image | Dockerfile | OS | Postgres | PostGIS | | --------------- | ---------- | -- | -------- | ------- | -| [postgis/postgis:12-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.4/alpine/Dockerfile) | alpine:3.20 | 12 | 3.4.3 | -| [postgis/postgis:13-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.4/alpine/Dockerfile) | alpine:3.20 | 13 | 3.4.3 | -| [postgis/postgis:14-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.4/alpine/Dockerfile) | alpine:3.20 | 14 | 3.4.3 | -| [postgis/postgis:15-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.4/alpine/Dockerfile) | alpine:3.20 | 15 | 3.4.3 | -| [postgis/postgis:16-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.4/alpine/Dockerfile) | alpine:3.20 | 16 | 3.4.3 | +| [postgis/postgis:12-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.5/alpine/Dockerfile) | alpine:3.20 | 12 | 3.5.0 | +| [postgis/postgis:13-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.5/alpine/Dockerfile) | alpine:3.20 | 13 | 3.5.0 | +| [postgis/postgis:14-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.5/alpine/Dockerfile) | alpine:3.20 | 14 | 3.5.0 | +| [postgis/postgis:15-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.5/alpine/Dockerfile) | alpine:3.20 | 15 | 3.5.0 | | [postgis/postgis:16-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.5/alpine/Dockerfile) | alpine:3.20 | 16 | 3.5.0 | -| [postgis/postgis:17-3.4-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.4-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.4/alpine/Dockerfile) | alpine:3.20 | 17 | 3.4.3 | | [postgis/postgis:17-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.5/alpine/Dockerfile) | alpine:3.20 | 17 | 3.5.0 | ### 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.1 or higher. The cgal version is locked on the [5.6.x-branch](https://github.com/CGAL/cgal/tree/5.6.x-branch). | DockerHub image | Dockerfile | OS | Postgres | PostGIS | | --------------- | ---------- | -- | -------- | ------- | | [postgis/postgis:16-master](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-master) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-master/Dockerfile) | debian:bullseye | 16 | development: postgis, geos, proj, gdal | | [postgis/postgis:17-master](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-master) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-master/Dockerfile) | debian:bullseye | 17 | development: postgis, geos, proj, gdal | + ## Usage In order to run a basic container capable of serving a PostGIS-enabled database, start a container as follows: @@ -154,7 +152,7 @@ For more specific issues related to the postgres docker image, you can search us - Optimizing Security Scans: It's advisable to focus on scanning and fixing issues that can be resolved. Use this command to scan for fixable issues only: - * `trivy image --ignore-unfixed postgis/postgis:16-3.4-alpine` + * `trivy image --ignore-unfixed postgis/postgis:16-3.5-alpine` * `trivy image --ignore-unfixed postgres:16-alpine` For more details, you can read this article: https://pythonspeed.com/articles/docker-security-scanner/ diff --git a/update.sh b/update.sh index e88d5c8a..fb85be5e 100755 --- a/update.sh +++ b/update.sh @@ -50,7 +50,7 @@ declare -A postgisDebPkgNameVersionSuffixes=( 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}')" +cgalGitHash="$(git ls-remote https://github.com/CGAL/cgal.git heads/master | 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}')" @@ -234,7 +234,7 @@ for version in "${versions[@]}"; do else cat Dockerfile.template > "$version/Dockerfile" fi - sed -i 's/%%TXT_AUTOGENERATED%%/'"$autogenerated"'/g; s/%%PG_MAJOR%%/'$postgresVersion'/g; s/%%POSTGIS_MAJOR%%/'$postgisMajor'/g; s/%%POSTGIS_VERSION%%/'$postgisFullVersion'/g; s/%%POSTGIS_GIT_HASH%%/'$postgisGitHash'/g; s/%%CGAL5X_GIT_HASH%%/'$cgal5XGitHash'/g; s/%%SFCGAL_GIT_HASH%%/'$sfcgalGitHash'/g; s/%%PROJ_GIT_HASH%%/'$projGitHash'/g; s/%%GDAL_GIT_HASH%%/'$gdalGitHash'/g; s/%%GEOS_GIT_HASH%%/'$geosGitHash'/g; s/%%BOOST_VERSION%%/'"$boostVersion"'/g; s/%%DEBIAN_VERSION%%/'"$suite"'/g;' "$version/Dockerfile" + sed -i 's/%%TXT_AUTOGENERATED%%/'"$autogenerated"'/g; s/%%PG_MAJOR%%/'$postgresVersion'/g; s/%%POSTGIS_MAJOR%%/'$postgisMajor'/g; s/%%POSTGIS_VERSION%%/'$postgisFullVersion'/g; s/%%POSTGIS_GIT_HASH%%/'$postgisGitHash'/g; s/%%CGAL_GIT_HASH%%/'$cgalGitHash'/g; s/%%SFCGAL_GIT_HASH%%/'$sfcgalGitHash'/g; s/%%PROJ_GIT_HASH%%/'$projGitHash'/g; s/%%GDAL_GIT_HASH%%/'$gdalGitHash'/g; s/%%GEOS_GIT_HASH%%/'$geosGitHash'/g; s/%%BOOST_VERSION%%/'"$boostVersion"'/g; s/%%DEBIAN_VERSION%%/'"$suite"'/g;' "$version/Dockerfile" echo "| [postgis/postgis:${version}](${dockerhublink}${version}) | [Dockerfile](${githubrepolink}/${version}/Dockerfile) | debian:${suite} | ${postgresVersion} | ${postgisDocSrc} |" >> _dockerlists_${optimized}.md )