Skip to content

Commit

Permalink
fix/add pg17beta2 and postgis3.5.0alpha2
Browse files Browse the repository at this point in the history
- rename/fix 17-beta to 17beta2-master
- add 17beta2-3.5.0alpha2-alpine
- add 16-3.5.0alpha2-alpine
- update README.md, update.sh, main.yml

running ./update.sh
  • Loading branch information
ImreSamu committed Jul 20, 2024
1 parent f29f8fd commit 8a0cbf9
Show file tree
Hide file tree
Showing 16 changed files with 409 additions and 35 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ jobs:
- postgres: 16
postgis: master
variant: default
- postgres: 17beta2
postgis: master
variant: default
- postgres: 16
postgis: 3.5.0alpha2
variant: alpine
- postgres: 17beta2
postgis: 3.5.0alpha2
variant: alpine

name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }}
runs-on: ubuntu-20.04
Expand Down
22 changes: 11 additions & 11 deletions 15-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
# 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 188e51bad36ffc30e49dbabda29620b71a84664c
ENV SFCGAL_GIT_HASH 61f3b08ade49493b56c6bafa98c7c1f84addbc10
ENV CGAL5X_GIT_HASH dfa981a844c121f4407e1f83092ccc533197b932
ENV SFCGAL_GIT_HASH a976da3b52692f4d3c30c898eac80673f8507b6d
RUN set -ex \
&& mkdir -p /usr/src \
&& cd /usr/src \
Expand Down Expand Up @@ -122,7 +122,7 @@ RUN set -ex \
&& rm -fr /usr/src/cgal

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

# geos
ENV GEOS_GIT_HASH a8d2ed0aba46f88f9b8987526e68eea6565d16ae
ENV GEOS_GIT_HASH 42546119c35e65aad72dea1477eb4a057ead631e
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/libgeos/geos.git \
Expand All @@ -168,7 +168,7 @@ RUN set -ex \
&& rm -fr /usr/src/geos

# gdal
ENV GDAL_GIT_HASH d7aed6e0b03f949ba40684f868c63a08d89177b1
ENV GDAL_GIT_HASH 0c57764ec2040c4e53c0313844ea5afccdc00279
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/gdal.git \
Expand Down Expand Up @@ -301,11 +301,11 @@ COPY --from=builder /usr/local /usr/local

ARG CGAL_GIT_BRANCH
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
ENV CGAL5X_GIT_HASH 188e51bad36ffc30e49dbabda29620b71a84664c
ENV SFCGAL_GIT_HASH 61f3b08ade49493b56c6bafa98c7c1f84addbc10
ENV PROJ_GIT_HASH 356496f7b60ee0235189dd51d99aac700fbd2bdc
ENV GEOS_GIT_HASH a8d2ed0aba46f88f9b8987526e68eea6565d16ae
ENV GDAL_GIT_HASH d7aed6e0b03f949ba40684f868c63a08d89177b1
ENV CGAL5X_GIT_HASH dfa981a844c121f4407e1f83092ccc533197b932
ENV SFCGAL_GIT_HASH a976da3b52692f4d3c30c898eac80673f8507b6d
ENV PROJ_GIT_HASH cce46228bde5b7dfa6d3b9048865f43dfbbeda30
ENV GEOS_GIT_HASH 42546119c35e65aad72dea1477eb4a057ead631e
ENV GDAL_GIT_HASH 0c57764ec2040c4e53c0313844ea5afccdc00279

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

# install postgis
ENV POSTGIS_GIT_HASH 8ed84517a9b86c86724504d1b6a0f0c1ccd86cf6
ENV POSTGIS_GIT_HASH 95c525d310b783db4a52d85506ef3cc713238683

RUN set -ex \
&& apt-get update \
Expand Down
3 changes: 3 additions & 0 deletions 16-3.5.0alpha2/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 16-3.5.0alpha2/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:16-alpine3.18
FROM ${BASE_IMAGE}

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

ENV POSTGIS_VERSION 3.5.0alpha2
ENV POSTGIS_SHA256 27c69b0f3d0a1329897060fb5e8345162d960f30b95f8903e98356fb3236427f

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 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
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions 16-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
# 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 188e51bad36ffc30e49dbabda29620b71a84664c
ENV SFCGAL_GIT_HASH 61f3b08ade49493b56c6bafa98c7c1f84addbc10
ENV CGAL5X_GIT_HASH dfa981a844c121f4407e1f83092ccc533197b932
ENV SFCGAL_GIT_HASH a976da3b52692f4d3c30c898eac80673f8507b6d
RUN set -ex \
&& mkdir -p /usr/src \
&& cd /usr/src \
Expand Down Expand Up @@ -122,7 +122,7 @@ RUN set -ex \
&& rm -fr /usr/src/cgal

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

# geos
ENV GEOS_GIT_HASH a8d2ed0aba46f88f9b8987526e68eea6565d16ae
ENV GEOS_GIT_HASH 42546119c35e65aad72dea1477eb4a057ead631e
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/libgeos/geos.git \
Expand All @@ -168,7 +168,7 @@ RUN set -ex \
&& rm -fr /usr/src/geos

# gdal
ENV GDAL_GIT_HASH d7aed6e0b03f949ba40684f868c63a08d89177b1
ENV GDAL_GIT_HASH 0c57764ec2040c4e53c0313844ea5afccdc00279
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/gdal.git \
Expand Down Expand Up @@ -301,11 +301,11 @@ COPY --from=builder /usr/local /usr/local

ARG CGAL_GIT_BRANCH
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
ENV CGAL5X_GIT_HASH 188e51bad36ffc30e49dbabda29620b71a84664c
ENV SFCGAL_GIT_HASH 61f3b08ade49493b56c6bafa98c7c1f84addbc10
ENV PROJ_GIT_HASH 356496f7b60ee0235189dd51d99aac700fbd2bdc
ENV GEOS_GIT_HASH a8d2ed0aba46f88f9b8987526e68eea6565d16ae
ENV GDAL_GIT_HASH d7aed6e0b03f949ba40684f868c63a08d89177b1
ENV CGAL5X_GIT_HASH dfa981a844c121f4407e1f83092ccc533197b932
ENV SFCGAL_GIT_HASH a976da3b52692f4d3c30c898eac80673f8507b6d
ENV PROJ_GIT_HASH cce46228bde5b7dfa6d3b9048865f43dfbbeda30
ENV GEOS_GIT_HASH 42546119c35e65aad72dea1477eb4a057ead631e
ENV GDAL_GIT_HASH 0c57764ec2040c4e53c0313844ea5afccdc00279

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

# install postgis
ENV POSTGIS_GIT_HASH 8ed84517a9b86c86724504d1b6a0f0c1ccd86cf6
ENV POSTGIS_GIT_HASH 95c525d310b783db4a52d85506ef3cc713238683

RUN set -ex \
&& apt-get update \
Expand Down
3 changes: 3 additions & 0 deletions 17beta2-3.5.0alpha2/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
Loading

0 comments on commit 8a0cbf9

Please sign in to comment.