Skip to content

Commit

Permalink
make update
Browse files Browse the repository at this point in the history
  • Loading branch information
ImreSamu committed May 12, 2023
1 parent 7bdb423 commit 9545937
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 278 deletions.
81 changes: 29 additions & 52 deletions 11-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:11-alpine3.17
ARG BASE_IMAGE=postgres:11-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
Expand All @@ -12,43 +12,6 @@ ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b

RUN set -eux \
\
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
set -eux ; \
#
# using only v3.17
#
#GEOS: https://pkgs.alpinelinux.org/packages?name=geos&branch=v3.17 \
export GEOS_ALPINE_VER=3.11 ; \
#GDAL: https://pkgs.alpinelinux.org/packages?name=gdal&branch=v3.17 \
export GDAL_ALPINE_VER=3.5 ; \
#PROJ: https://pkgs.alpinelinux.org/packages?name=proj&branch=v3.17 \
export PROJ_ALPINE_VER=9.1 ; \
#
elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then \
set -eux ; \
#
# using older branches v3.13; v3.14 for GEOS,GDAL,PROJ
#
#GEOS: https://pkgs.alpinelinux.org/packages?name=geos&branch=v3.13 \
export GEOS_ALPINE_VER=3.8 ; \
#GDAL: https://pkgs.alpinelinux.org/packages?name=gdal&branch=v3.14 \
export GDAL_ALPINE_VER=3.2 ; \
#PROJ: https://pkgs.alpinelinux.org/packages?name=proj&branch=v3.14 \
export PROJ_ALPINE_VER=7.2 ; \
#
\
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/main' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/community' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.13/main' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.13/community' >> /etc/apk/repositories ; \
\
else \
set -eux ; \
echo ".... unknown \$POSTGIS_VERSION ...." ; \
exit 1 ; \
fi \
\
&& apk add --no-cache --virtual .fetch-deps \
ca-certificates \
openssl \
Expand All @@ -66,9 +29,11 @@ RUN set -eux \
\
&& apk add --no-cache --virtual .build-deps \
\
gdal-dev~=${GDAL_ALPINE_VER} \
geos-dev~=${GEOS_ALPINE_VER} \
proj-dev~=${PROJ_ALPINE_VER} \
gdal-dev \
geos-dev \
proj-dev \
proj-util \
sfcgal-dev \
\
autoconf \
automake \
Expand All @@ -84,7 +49,7 @@ RUN set -eux \
libxml2-dev \
llvm-dev \
make \
pcre-dev \
pcre2-dev \
perl \
protobuf-c-dev \
\
Expand All @@ -94,24 +59,35 @@ RUN set -eux \
&& gettextize \
&& ./autogen.sh \
&& ./configure \
--with-pcredir="$(pcre-config --prefix)" \
--with-pcredir="$(pcre2-config --prefix)" \
--enable-lto \
&& make -j$(nproc) \
&& make install \
\
# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316
&& 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 \
# regress check
&& mkdir /tempdb \
&& chown -R postgres:postgres /tempdb \
&& su postgres -c 'pg_ctl -D /tempdb init' \
&& su postgres -c 'pg_ctl -D /tempdb start' \
\
# && su postgres -c 'pg_ctl -D /tempdb start' \
# \
# temporary disable jit for "development" \
# https://github.com/docker-library/postgres/issues/1076#issuecomment-1545209600 \
# DO NOT USE IN PRODUCTION; PLEASE NOT MERGE TO MASTER! \
#
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
\
&& cd regress \
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \
#&& make garden 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;"' \
## sfcgal expected with the next alpine release : 3.18
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
&& 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;"' \
Expand All @@ -127,13 +103,14 @@ RUN set -eux \
# add .postgis-rundeps
&& apk add --no-cache --virtual .postgis-rundeps \
\
gdal~=${GDAL_ALPINE_VER} \
geos~=${GEOS_ALPINE_VER} \
proj~=${PROJ_ALPINE_VER} \
gdal \
geos \
proj \
sfcgal \
\
json-c \
libstdc++ \
pcre \
pcre2 \
protobuf-c \
\
# ca-certificates: for accessing remote raster files
Expand Down
81 changes: 29 additions & 52 deletions 12-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:12-alpine3.17
ARG BASE_IMAGE=postgres:12-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
Expand All @@ -12,43 +12,6 @@ ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b

RUN set -eux \
\
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
set -eux ; \
#
# using only v3.17
#
#GEOS: https://pkgs.alpinelinux.org/packages?name=geos&branch=v3.17 \
export GEOS_ALPINE_VER=3.11 ; \
#GDAL: https://pkgs.alpinelinux.org/packages?name=gdal&branch=v3.17 \
export GDAL_ALPINE_VER=3.5 ; \
#PROJ: https://pkgs.alpinelinux.org/packages?name=proj&branch=v3.17 \
export PROJ_ALPINE_VER=9.1 ; \
#
elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then \
set -eux ; \
#
# using older branches v3.13; v3.14 for GEOS,GDAL,PROJ
#
#GEOS: https://pkgs.alpinelinux.org/packages?name=geos&branch=v3.13 \
export GEOS_ALPINE_VER=3.8 ; \
#GDAL: https://pkgs.alpinelinux.org/packages?name=gdal&branch=v3.14 \
export GDAL_ALPINE_VER=3.2 ; \
#PROJ: https://pkgs.alpinelinux.org/packages?name=proj&branch=v3.14 \
export PROJ_ALPINE_VER=7.2 ; \
#
\
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/main' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/community' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.13/main' >> /etc/apk/repositories ; \
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.13/community' >> /etc/apk/repositories ; \
\
else \
set -eux ; \
echo ".... unknown \$POSTGIS_VERSION ...." ; \
exit 1 ; \
fi \
\
&& apk add --no-cache --virtual .fetch-deps \
ca-certificates \
openssl \
Expand All @@ -66,9 +29,11 @@ RUN set -eux \
\
&& apk add --no-cache --virtual .build-deps \
\
gdal-dev~=${GDAL_ALPINE_VER} \
geos-dev~=${GEOS_ALPINE_VER} \
proj-dev~=${PROJ_ALPINE_VER} \
gdal-dev \
geos-dev \
proj-dev \
proj-util \
sfcgal-dev \
\
autoconf \
automake \
Expand All @@ -84,7 +49,7 @@ RUN set -eux \
libxml2-dev \
llvm-dev \
make \
pcre-dev \
pcre2-dev \
perl \
protobuf-c-dev \
\
Expand All @@ -94,24 +59,35 @@ RUN set -eux \
&& gettextize \
&& ./autogen.sh \
&& ./configure \
--with-pcredir="$(pcre-config --prefix)" \
--with-pcredir="$(pcre2-config --prefix)" \
--enable-lto \
&& make -j$(nproc) \
&& make install \
\
# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316
&& 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 \
# regress check
&& mkdir /tempdb \
&& chown -R postgres:postgres /tempdb \
&& su postgres -c 'pg_ctl -D /tempdb init' \
&& su postgres -c 'pg_ctl -D /tempdb start' \
\
# && su postgres -c 'pg_ctl -D /tempdb start' \
# \
# temporary disable jit for "development" \
# https://github.com/docker-library/postgres/issues/1076#issuecomment-1545209600 \
# DO NOT USE IN PRODUCTION; PLEASE NOT MERGE TO MASTER! \
#
&& su postgres -c 'pg_ctl -o "--jit=off" -D /tempdb start' \
\
&& cd regress \
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \
#&& make garden 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;"' \
## sfcgal expected with the next alpine release : 3.18
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
&& 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;"' \
Expand All @@ -127,13 +103,14 @@ RUN set -eux \
# add .postgis-rundeps
&& apk add --no-cache --virtual .postgis-rundeps \
\
gdal~=${GDAL_ALPINE_VER} \
geos~=${GEOS_ALPINE_VER} \
proj~=${PROJ_ALPINE_VER} \
gdal \
geos \
proj \
sfcgal \
\
json-c \
libstdc++ \
pcre \
pcre2 \
protobuf-c \
\
# ca-certificates: for accessing remote raster files
Expand Down
Loading

0 comments on commit 9545937

Please sign in to comment.