diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df0574898..b3f56b8eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: runner-platform: ['ubuntu-24.04', 'ubuntu-24.04-arm'] - postgres: [13, 14, 15, 16, 17] + postgres: [13, 14, 15, 16, 17 ] postgis: ['3.5'] variant: [default, alpine] include: @@ -37,22 +37,37 @@ jobs: variant: default runner-platform: 'ubuntu-24.04-arm' - postgres: 17 - postgis: '3.6.0beta1' + postgis: '3.6' variant: alpine runner-platform: 'ubuntu-24.04' - postgres: 17 - postgis: '3.6.0beta1' + postgis: '3.6' variant: alpine runner-platform: 'ubuntu-24.04-arm' + - postgres: 18rc1 + postgis: '3.6' + variant: alpine + runner-platform: 'ubuntu-24.04' + - postgres: 18rc1 + postgis: '3.6' + variant: alpine + runner-platform: 'ubuntu-24.04-arm' + - postgres: 18rc1 + postgis: '3.6' + variant: default + runner-platform: 'ubuntu-24.04' + - postgres: 18rc1 + postgis: '3.6' + variant: default + runner-platform: 'ubuntu-24.04-arm' - - name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }} on ${{ matrix.runner-platform }} + name: ${{ matrix.postgres }}-${{ matrix.postgis }}-${{ matrix.variant }} ${{ matrix.runner-platform }} - Build Docker image runs-on: ${{ matrix.runner-platform }} continue-on-error: ${{ matrix.postgis == 'master' }} env: VERSION: ${{ matrix.postgres }}-${{ matrix.postgis }} VARIANT: ${{ matrix.variant }} - DOCKER_APT_PKG_VER: '5:28.3.2-1~ubuntu.24.04~noble' + DOCKER_APT_PKG_VER: '5:28.3.3-1~ubuntu.24.04~noble' steps: - name: Install/config specific version of Docker packages diff --git a/13-3.5/alpine/update-postgis.sh b/13-3.5/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/13-3.5/alpine/update-postgis.sh +++ b/13-3.5/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/13-3.5/update-postgis.sh b/13-3.5/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/13-3.5/update-postgis.sh +++ b/13-3.5/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/14-3.5/alpine/update-postgis.sh b/14-3.5/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/14-3.5/alpine/update-postgis.sh +++ b/14-3.5/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/14-3.5/update-postgis.sh b/14-3.5/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/14-3.5/update-postgis.sh +++ b/14-3.5/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/15-3.5/alpine/update-postgis.sh b/15-3.5/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/15-3.5/alpine/update-postgis.sh +++ b/15-3.5/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/15-3.5/update-postgis.sh b/15-3.5/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/15-3.5/update-postgis.sh +++ b/15-3.5/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/16-3.5/alpine/update-postgis.sh b/16-3.5/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/16-3.5/alpine/update-postgis.sh +++ b/16-3.5/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/16-3.5/update-postgis.sh b/16-3.5/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/16-3.5/update-postgis.sh +++ b/16-3.5/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/16-master/Dockerfile b/16-master/Dockerfile index 1a391c843..24cd3fd71 100644 --- a/16-master/Dockerfile +++ b/16-master/Dockerfile @@ -86,8 +86,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH b2ba32307c065676668ec24383d54ee94ec9f402 -ENV SFCGAL_GIT_HASH 6b64fbd4d55b20887aa12ffafd848b05629577cc +ENV CGAL_GIT_HASH 47938f6851b557e04e132a3358d7f6399b897749 +ENV SFCGAL_GIT_HASH 12316fe0992850d696bc24890ba0b4a71c3cf941 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ @@ -120,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH 27dfb11f26cae01db9b7981da7d184cfd3a50e50 +ENV PROJ_GIT_HASH 2c57ef83573872e5121004daf96d1c0bbf635471 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -150,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH e308bf7a0dddb6842dc2ac73b5fd5c8a5c599263 +ENV GEOS_GIT_HASH 79390691cfe0d428ab75bf10448b9cb82696e917 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -166,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH 47b7f08a542c4b589b17f3a2856ded74ba421d9b +ENV GDAL_GIT_HASH 1e14117dfdbb599d7b237504599d1937eb6a7d03 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -299,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH b2ba32307c065676668ec24383d54ee94ec9f402 -ENV SFCGAL_GIT_HASH 6b64fbd4d55b20887aa12ffafd848b05629577cc -ENV PROJ_GIT_HASH 27dfb11f26cae01db9b7981da7d184cfd3a50e50 -ENV GEOS_GIT_HASH e308bf7a0dddb6842dc2ac73b5fd5c8a5c599263 -ENV GDAL_GIT_HASH 47b7f08a542c4b589b17f3a2856ded74ba421d9b +ENV CGAL_GIT_HASH 47938f6851b557e04e132a3358d7f6399b897749 +ENV SFCGAL_GIT_HASH 12316fe0992850d696bc24890ba0b4a71c3cf941 +ENV PROJ_GIT_HASH 2c57ef83573872e5121004daf96d1c0bbf635471 +ENV GEOS_GIT_HASH 79390691cfe0d428ab75bf10448b9cb82696e917 +ENV GDAL_GIT_HASH 1e14117dfdbb599d7b237504599d1937eb6a7d03 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -322,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH 7c8cfe07df65efa1c5a715ad69fbdec06413ed2f +ENV POSTGIS_GIT_HASH ff7d11679c1851caa081a730a70fd29d7e8f84e7 RUN set -ex \ && apt-get update \ diff --git a/16-master/update-postgis.sh b/16-master/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/16-master/update-postgis.sh +++ b/16-master/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/17-3.5/alpine/update-postgis.sh b/17-3.5/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/17-3.5/alpine/update-postgis.sh +++ b/17-3.5/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/17-3.5/update-postgis.sh b/17-3.5/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/17-3.5/update-postgis.sh +++ b/17-3.5/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/17-3.6.0beta1/Dockerfile b/17-3.6/Dockerfile similarity index 100% rename from 17-3.6.0beta1/Dockerfile rename to 17-3.6/Dockerfile diff --git a/17-3.6.0beta1/alpine/Dockerfile b/17-3.6/alpine/Dockerfile similarity index 95% rename from 17-3.6.0beta1/alpine/Dockerfile rename to 17-3.6/alpine/Dockerfile index 74bea1925..984764166 100644 --- a/17-3.6.0beta1/alpine/Dockerfile +++ b/17-3.6/alpine/Dockerfile @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:17-alpine3.22 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.6.0beta1 spatial database extension with PostgreSQL 17 Alpine" \ + org.opencontainers.image.description="PostGIS 3.6.0 spatial database extension with PostgreSQL 17 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.6.0beta1 -ENV POSTGIS_SHA256 fb38afeae97455202b81312245a82809a16787ee379e5e497ce813fa2c878ade +ENV POSTGIS_VERSION 3.6.0 +ENV POSTGIS_SHA256 a2308e6b64f48b6985285bdfa40ddeb8eaa0630f3f1fdb92b487d49562fdcafd RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/17-3.6.0beta1/alpine/initdb-postgis.sh b/17-3.6/alpine/initdb-postgis.sh similarity index 100% rename from 17-3.6.0beta1/alpine/initdb-postgis.sh rename to 17-3.6/alpine/initdb-postgis.sh diff --git a/17-3.6.0beta1/alpine/update-postgis.sh b/17-3.6/alpine/update-postgis.sh similarity index 93% rename from 17-3.6.0beta1/alpine/update-postgis.sh rename to 17-3.6/alpine/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/17-3.6.0beta1/alpine/update-postgis.sh +++ b/17-3.6/alpine/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/17-master/Dockerfile b/17-master/Dockerfile index d8894d0b9..55a6fc89f 100644 --- a/17-master/Dockerfile +++ b/17-master/Dockerfile @@ -86,8 +86,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH b2ba32307c065676668ec24383d54ee94ec9f402 -ENV SFCGAL_GIT_HASH 6b64fbd4d55b20887aa12ffafd848b05629577cc +ENV CGAL_GIT_HASH 47938f6851b557e04e132a3358d7f6399b897749 +ENV SFCGAL_GIT_HASH 12316fe0992850d696bc24890ba0b4a71c3cf941 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ @@ -120,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH 27dfb11f26cae01db9b7981da7d184cfd3a50e50 +ENV PROJ_GIT_HASH 2c57ef83573872e5121004daf96d1c0bbf635471 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -150,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH e308bf7a0dddb6842dc2ac73b5fd5c8a5c599263 +ENV GEOS_GIT_HASH 79390691cfe0d428ab75bf10448b9cb82696e917 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -166,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH 47b7f08a542c4b589b17f3a2856ded74ba421d9b +ENV GDAL_GIT_HASH 1e14117dfdbb599d7b237504599d1937eb6a7d03 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -299,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH b2ba32307c065676668ec24383d54ee94ec9f402 -ENV SFCGAL_GIT_HASH 6b64fbd4d55b20887aa12ffafd848b05629577cc -ENV PROJ_GIT_HASH 27dfb11f26cae01db9b7981da7d184cfd3a50e50 -ENV GEOS_GIT_HASH e308bf7a0dddb6842dc2ac73b5fd5c8a5c599263 -ENV GDAL_GIT_HASH 47b7f08a542c4b589b17f3a2856ded74ba421d9b +ENV CGAL_GIT_HASH 47938f6851b557e04e132a3358d7f6399b897749 +ENV SFCGAL_GIT_HASH 12316fe0992850d696bc24890ba0b4a71c3cf941 +ENV PROJ_GIT_HASH 2c57ef83573872e5121004daf96d1c0bbf635471 +ENV GEOS_GIT_HASH 79390691cfe0d428ab75bf10448b9cb82696e917 +ENV GDAL_GIT_HASH 1e14117dfdbb599d7b237504599d1937eb6a7d03 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -322,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH 7c8cfe07df65efa1c5a715ad69fbdec06413ed2f +ENV POSTGIS_GIT_HASH ff7d11679c1851caa081a730a70fd29d7e8f84e7 RUN set -ex \ && apt-get update \ diff --git a/17-master/update-postgis.sh b/17-master/update-postgis.sh index f98abd261..3e60e3983 100755 --- a/17-master/update-postgis.sh +++ b/17-master/update-postgis.sh @@ -13,7 +13,7 @@ for DB in template_postgis "$POSTGRES_DB" "${@}"; do psql --dbname="$DB" -c " -- Upgrade PostGIS (includes raster) CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; + ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; -- Upgrade Topology CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; diff --git a/18rc1-3.6/Dockerfile b/18rc1-3.6/Dockerfile new file mode 100644 index 000000000..2f75fd3e6 --- /dev/null +++ b/18rc1-3.6/Dockerfile @@ -0,0 +1,28 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM postgres:18rc1-trixie + +LABEL maintainer="PostGIS Project - https://postgis.net" \ + org.opencontainers.image.description="PostGIS 3.6.0+dfsg-1.pgdg13+1 spatial database extension with PostgreSQL 18rc1 trixie" \ + org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.6.0+dfsg-1.pgdg13+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/18rc1-3.6/alpine/Dockerfile b/18rc1-3.6/alpine/Dockerfile new file mode 100644 index 000000000..fefa3b0e5 --- /dev/null +++ b/18rc1-3.6/alpine/Dockerfile @@ -0,0 +1,124 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. +# +ARG BASE_IMAGE=postgres:18rc1-alpine3.22 +FROM ${BASE_IMAGE} + +LABEL maintainer="PostGIS Project - https://postgis.net" \ + org.opencontainers.image.description="PostGIS 3.6.0 spatial database extension with PostgreSQL 18rc1 Alpine" \ + org.opencontainers.image.source="https://github.com/postgis/docker-postgis" + +ENV POSTGIS_VERSION 3.6.0 +ENV POSTGIS_SHA256 a2308e6b64f48b6985285bdfa40ddeb8eaa0630f3f1fdb92b487d49562fdcafd + +RUN set -eux \ + && apk add --no-cache --virtual .fetch-deps \ + ca-certificates \ + openssl \ + tar \ + \ + && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/${POSTGIS_VERSION}.tar.gz" \ + && echo "${POSTGIS_SHA256} *postgis.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/src/postgis \ + && tar \ + --extract \ + --file postgis.tar.gz \ + --directory /usr/src/postgis \ + --strip-components 1 \ + && rm postgis.tar.gz \ + \ + && apk add --no-cache --virtual .build-deps \ + \ + 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 \ + cunit-dev \ + file \ + g++ \ + gcc \ + gettext-dev \ + git \ + json-c-dev \ + libtool \ + libxml2-dev \ + make \ + pcre2-dev \ + perl \ + protobuf-c-dev \ + \ +# 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 --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 \ + geos \ + proj \ + sfcgal \ + \ + json-c \ + libstdc++ \ + pcre2 \ + protobuf-c \ + \ + # 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 \ + && apk del .fetch-deps .build-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/18rc1-3.6/alpine/initdb-postgis.sh b/18rc1-3.6/alpine/initdb-postgis.sh new file mode 100644 index 000000000..e38ad7d66 --- /dev/null +++ b/18rc1-3.6/alpine/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/18rc1-3.6/alpine/update-postgis.sh b/18rc1-3.6/alpine/update-postgis.sh new file mode 100755 index 000000000..3e60e3983 --- /dev/null +++ b/18rc1-3.6/alpine/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/18rc1-3.6/initdb-postgis.sh b/18rc1-3.6/initdb-postgis.sh new file mode 100644 index 000000000..e38ad7d66 --- /dev/null +++ b/18rc1-3.6/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/18rc1-3.6/update-postgis.sh b/18rc1-3.6/update-postgis.sh new file mode 100755 index 000000000..3e60e3983 --- /dev/null +++ b/18rc1-3.6/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/README.md b/README.md index bbc31eb98..35b3576c9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,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 (2025-07-11) +# Versions (2025-09-08) Supported architecture: `amd64` (also known as X86-64)" @@ -29,7 +29,16 @@ Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postg * 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.9, gdal=3.2, proj=7.2, and sfcgal=1.3.9. + * In the Debian Bullseye repository (for PostgreSQL12 to 17), the versions are: + * geos=3.9 + * gdal=3.2 + * proj=7.2 + * sfcgal=1.3.9 + * In the Debian trixie repository (for PostgreSQL18+), the versions are: + * geos=3.13 + * gdal=3.10 + * proj=9.6 + * sfcgal2=2.0 * This version is easy to extend and has matured over time. | DockerHub image | Dockerfile | OS | Postgres | PostGIS | @@ -43,7 +52,11 @@ Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postg ### Alpine 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.22 version, the package versions are: geos=3.13.1, gdal=3.10.2, proj=9.6.0, and sfcgal=2.0.0 +* In the Alpine 3.22 version, the package versions are: + * geos=3.13.1 + * gdal=3.10.2 + * proj=9.6.0 + * sfcgal=2.0.0 * PostGIS is compiled from source, making it a bit more challenging to extend. | DockerHub image | Dockerfile | OS | Postgres | PostGIS | @@ -53,6 +66,7 @@ Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postg | [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.22 | 15 | 3.5.3 | | [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.22 | 16 | 3.5.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.22 | 17 | 3.5.3 | +| [postgis/postgis:17-3.6-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.6-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.6/alpine/Dockerfile) | alpine:3.22 | 17 | 3.6.0 | ### Test images @@ -62,8 +76,9 @@ Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postg | 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-3.6.0alpha1-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.6.0alpha1-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.6.0alpha1/alpine/Dockerfile) | alpine:3.22 | 17 | 3.6.0alpha1 | | [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 | +| [postgis/postgis:18rc1-3.6](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=18rc1-3.6) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/18rc1-3.6/Dockerfile) | debian:trixie | 18rc1 | 3.6.0 | +| [postgis/postgis:18rc1-3.6-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=18rc1-3.6-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/18rc1-3.6/alpine/Dockerfile) | alpine:3.22 | 18rc1 | 3.6.0 | ## Usage diff --git a/update.sh b/update.sh index 7a04b6d4e..421b7a062 100755 --- a/update.sh +++ b/update.sh @@ -36,7 +36,8 @@ declare -A debianSuite=( [15]='bullseye-slim' [16]='bullseye-slim' [17]='bullseye-slim' - [18]='bullseye-slim' + [18rc1]='trixie-slim' + [18]='trixie-slim' ) defaultPostgisDebPkgNameVersionSuffix='3' @@ -163,6 +164,8 @@ for version in "${versions[@]}"; do if [ "$suite" = "bullseye" ]; then boostVersion="1.74.0" + elif [ "$suite" = "trixie" ]; then + boostVersion="1.88.0" else echo "Unknown debian version; stop" exit 1