Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ jobs:
postgis: master
variant: default
runner-platform: 'ubuntu-24.04-arm'
- postgres: 17
postgis: '3.6.0alpha1'
variant: alpine
runner-platform: 'ubuntu-24.04'
- postgres: 17
postgis: '3.6.0alpha1'
variant: alpine
runner-platform: 'ubuntu-24.04-arm'


name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }} on ${{ matrix.runner-platform }}
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.0.0-1~ubuntu.24.04~noble'
DOCKER_APT_PKG_VER: '5:28.1.1-1~ubuntu.24.04~noble'

steps:
- name: Install/config specific version of Docker packages
Expand All @@ -61,6 +70,8 @@ jobs:
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
echo "***** Check available docker-ce versions ."
sudo apt policy docker-ce
echo "***** Installing Docker packages..."
sudo apt-get install docker-ce=${{ env.DOCKER_APT_PKG_VER }} docker-ce-cli=${{ env.DOCKER_APT_PKG_VER }} containerd.io docker-buildx-plugin docker-compose-plugin
echo "***** Verifying initial Docker installation..."
Expand Down
8 changes: 4 additions & 4 deletions 13-3.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:13-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.5.2 spatial database extension with PostgreSQL 13 Alpine" \
org.opencontainers.image.description="PostGIS 3.5.3 spatial database extension with PostgreSQL 13 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.5.2
ENV POSTGIS_SHA256 71d8f5d06debec0bdd94525a5a1d42417ed2a1f65d0070a1a3e3e381b606ee35
ENV POSTGIS_VERSION 3.5.3
ENV POSTGIS_SHA256 44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN set -eux \
&& 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 \
&& 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;"' \
Expand Down
8 changes: 4 additions & 4 deletions 14-3.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:14-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.5.2 spatial database extension with PostgreSQL 14 Alpine" \
org.opencontainers.image.description="PostGIS 3.5.3 spatial database extension with PostgreSQL 14 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.5.2
ENV POSTGIS_SHA256 71d8f5d06debec0bdd94525a5a1d42417ed2a1f65d0070a1a3e3e381b606ee35
ENV POSTGIS_VERSION 3.5.3
ENV POSTGIS_SHA256 44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN set -eux \
&& 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 \
&& 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;"' \
Expand Down
8 changes: 4 additions & 4 deletions 15-3.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:15-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.5.2 spatial database extension with PostgreSQL 15 Alpine" \
org.opencontainers.image.description="PostGIS 3.5.3 spatial database extension with PostgreSQL 15 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.5.2
ENV POSTGIS_SHA256 71d8f5d06debec0bdd94525a5a1d42417ed2a1f65d0070a1a3e3e381b606ee35
ENV POSTGIS_VERSION 3.5.3
ENV POSTGIS_SHA256 44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN set -eux \
&& 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 \
&& 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;"' \
Expand Down
8 changes: 4 additions & 4 deletions 16-3.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:16-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.5.2 spatial database extension with PostgreSQL 16 Alpine" \
org.opencontainers.image.description="PostGIS 3.5.3 spatial database extension with PostgreSQL 16 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.5.2
ENV POSTGIS_SHA256 71d8f5d06debec0bdd94525a5a1d42417ed2a1f65d0070a1a3e3e381b606ee35
ENV POSTGIS_VERSION 3.5.3
ENV POSTGIS_SHA256 44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN set -eux \
&& 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 \
&& 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;"' \
Expand Down
24 changes: 12 additions & 12 deletions 16-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 b19515e1f82660c9709a2bd152991b8f85d3f411
ENV SFCGAL_GIT_HASH a88742fe3c794e859c2b98e1f1daf030643ebdbf
ENV CGAL_GIT_HASH 3610121c03353a9db28d1823685e0331fa0eb01e
ENV SFCGAL_GIT_HASH 908fc727b3cd9c59a9a950e462b8f2cc7f50cbe2
RUN set -ex \
&& mkdir -p /usr/src \
&& cd /usr/src \
Expand Down Expand Up @@ -120,7 +120,7 @@ RUN set -ex \
&& rm -fr /usr/src/cgal

# proj
ENV PROJ_GIT_HASH 8268efca12986e8d33c13cd42aa16ccbf14d86c1
ENV PROJ_GIT_HASH b2eda4380ba433ca0702131b026309246ee5b5a5
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/PROJ.git \
Expand Down Expand Up @@ -150,7 +150,7 @@ RUN set -ex \
&& rm -fr /usr/src/PROJ

# geos
ENV GEOS_GIT_HASH b77f7fa6fb4161f3587eba1b6e7f00197ce46bc5
ENV GEOS_GIT_HASH 31399d845873fa03caee5141f7c355cbd0660c83
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/libgeos/geos.git \
Expand All @@ -166,7 +166,7 @@ RUN set -ex \
&& rm -fr /usr/src/geos

# gdal
ENV GDAL_GIT_HASH 28c687a4bbf94522fd2424b007746763819c0ff4
ENV GDAL_GIT_HASH 2f9b255b4c3e200435900c7605a8d42cc59f5f1d
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/gdal.git \
Expand Down Expand Up @@ -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 b19515e1f82660c9709a2bd152991b8f85d3f411
ENV SFCGAL_GIT_HASH a88742fe3c794e859c2b98e1f1daf030643ebdbf
ENV PROJ_GIT_HASH 8268efca12986e8d33c13cd42aa16ccbf14d86c1
ENV GEOS_GIT_HASH b77f7fa6fb4161f3587eba1b6e7f00197ce46bc5
ENV GDAL_GIT_HASH 28c687a4bbf94522fd2424b007746763819c0ff4
ENV CGAL_GIT_HASH 3610121c03353a9db28d1823685e0331fa0eb01e
ENV SFCGAL_GIT_HASH 908fc727b3cd9c59a9a950e462b8f2cc7f50cbe2
ENV PROJ_GIT_HASH b2eda4380ba433ca0702131b026309246ee5b5a5
ENV GEOS_GIT_HASH 31399d845873fa03caee5141f7c355cbd0660c83
ENV GDAL_GIT_HASH 2f9b255b4c3e200435900c7605a8d42cc59f5f1d

# Minimal command line test ( fail fast )
RUN set -ex \
Expand All @@ -322,7 +322,7 @@ RUN set -ex \
|| echo "ogr2ogr missing PostgreSQL driver" && exit 1

# install postgis
ENV POSTGIS_GIT_HASH b98401af48b5372bf73ba27e4c4cfcc78ebd49d1
ENV POSTGIS_GIT_HASH 81e2bc783b77cc740291445e992658e1db7179e0

RUN set -ex \
&& apt-get update \
Expand Down Expand Up @@ -382,7 +382,7 @@ RUN set -ex \
&& 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 \
&& 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;"' \
Expand Down
8 changes: 4 additions & 4 deletions 17-3.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:17-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.5.2 spatial database extension with PostgreSQL 17 Alpine" \
org.opencontainers.image.description="PostGIS 3.5.3 spatial database extension with PostgreSQL 17 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.5.2
ENV POSTGIS_SHA256 71d8f5d06debec0bdd94525a5a1d42417ed2a1f65d0070a1a3e3e381b606ee35
ENV POSTGIS_VERSION 3.5.3
ENV POSTGIS_SHA256 44222ed2b8f742ffc1ceb429b09ebb484c7880f9ba27bf7b6b197346cdd25437

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -78,7 +78,7 @@ RUN set -eux \
&& 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 \
&& 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;"' \
Expand Down
3 changes: 3 additions & 0 deletions 17-3.6.0alpha1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# placeholder Dockerfile
# Debian version of postgis is not detected!
# This is an autogenerated message of ./update.sh
124 changes: 124 additions & 0 deletions 17-3.6.0alpha1/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:17-alpine3.21
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.6.0alpha1 spatial database extension with PostgreSQL 17 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.6.0alpha1
ENV POSTGIS_SHA256 9f1981716001afff2e4ec75e4107cb64e8d3d9d26ad2abf573444038db0830eb

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
25 changes: 25 additions & 0 deletions 17-3.6.0alpha1/alpine/initdb-postgis.sh
Original file line number Diff line number Diff line change
@@ -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
Loading