Skip to content

Commit

Permalink
Update / README and template changes (#342)
Browse files Browse the repository at this point in the history
* extend README with practical advices

* update LABEL

* update LABEL, add BASE_IMAGE; improve testing code

* small edits

* make update

* fix alpine template

* make update

* add cunit-dev;git to alpine

* make update

* master: fix lto; and add cunit

* make update
  • Loading branch information
ImreSamu authored Apr 25, 2023
1 parent 8a3ed2b commit b50183f
Show file tree
Hide file tree
Showing 16 changed files with 209 additions and 58 deletions.
4 changes: 3 additions & 1 deletion 11-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

FROM postgres:11-bullseye

LABEL maintainer="PostGIS Project - https://postgis.net"
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 11 bullseye" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1
Expand Down
19 changes: 16 additions & 3 deletions 11-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:11-alpine3.17
FROM ${BASE_IMAGE}

FROM postgres:11-alpine3.17

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

ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
Expand Down Expand Up @@ -71,10 +73,12 @@ RUN set -eux \
autoconf \
automake \
clang-dev \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
Expand Down Expand Up @@ -105,8 +109,17 @@ RUN set -eux \
#&& 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 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 \
Expand Down
4 changes: 3 additions & 1 deletion 12-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

FROM postgres:12-bullseye

LABEL maintainer="PostGIS Project - https://postgis.net"
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.2+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.3.2+dfsg-1.pgdg110+1
Expand Down
19 changes: 16 additions & 3 deletions 12-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:12-alpine3.17
FROM ${BASE_IMAGE}

FROM postgres:12-alpine3.17

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

ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
Expand Down Expand Up @@ -71,10 +73,12 @@ RUN set -eux \
autoconf \
automake \
clang-dev \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
Expand Down Expand Up @@ -105,8 +109,17 @@ RUN set -eux \
#&& 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 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 \
Expand Down
4 changes: 3 additions & 1 deletion 13-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

FROM postgres:13-bullseye

LABEL maintainer="PostGIS Project - https://postgis.net"
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.2+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.3.2+dfsg-1.pgdg110+1
Expand Down
19 changes: 16 additions & 3 deletions 13-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:13-alpine3.17
FROM ${BASE_IMAGE}

FROM postgres:13-alpine3.17

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

ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
Expand Down Expand Up @@ -71,10 +73,12 @@ RUN set -eux \
autoconf \
automake \
clang-dev \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
Expand Down Expand Up @@ -105,8 +109,17 @@ RUN set -eux \
#&& 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 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 \
Expand Down
4 changes: 3 additions & 1 deletion 14-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

FROM postgres:14-bullseye

LABEL maintainer="PostGIS Project - https://postgis.net"
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.2+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.3.2+dfsg-1.pgdg110+1
Expand Down
19 changes: 16 additions & 3 deletions 14-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:14-alpine3.17
FROM ${BASE_IMAGE}

FROM postgres:14-alpine3.17

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

ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
Expand Down Expand Up @@ -71,10 +73,12 @@ RUN set -eux \
autoconf \
automake \
clang-dev \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
Expand Down Expand Up @@ -105,8 +109,17 @@ RUN set -eux \
#&& 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 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 \
Expand Down
26 changes: 14 additions & 12 deletions 14-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
ARG DOCKER_CMAKE_BUILD_TYPE=Release
FROM postgres:14-bullseye as builder

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

WORKDIR /

Expand Down Expand Up @@ -85,7 +86,7 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
# By utilizing the latest commit of the CGAL 5.5.x-branch and implementing a header-only build for SFCGAL,
# one can benefit from the latest CGAL patches while avoiding compatibility issues.
ENV CGAL_GIT_BRANCH 5.5.x-branch
ENV CGAL55_GIT_HASH b4c04b53e0b9479e568fc76830976e281d02c9b4
ENV CGAL55_GIT_HASH 65802d87aa16308a5ef1472e4b674c3bf7293da3
ENV SFCGAL_GIT_HASH df3c2ccc015d4a85ac672fc307d2c7c324cccca7
RUN set -ex \
&& mkdir -p /usr/src \
Expand Down Expand Up @@ -119,7 +120,7 @@ RUN set -ex \
&& rm -fr /usr/src/cgal

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

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

# gdal
ENV GDAL_GIT_HASH 67eaa768c017a21200c7acd9c208d104efea512d
ENV GDAL_GIT_HASH 717dcc0eed252e2f78c142b1f7866e49c5511224
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/gdal.git \
Expand Down Expand Up @@ -297,11 +298,11 @@ COPY --from=builder /_pgis*.* /
COPY --from=builder /usr/local /usr/local

ENV CGAL_GIT_BRANCH 5.5.x-branch
ENV CGAL55_GIT_HASH b4c04b53e0b9479e568fc76830976e281d02c9b4
ENV CGAL55_GIT_HASH 65802d87aa16308a5ef1472e4b674c3bf7293da3
ENV SFCGAL_GIT_HASH df3c2ccc015d4a85ac672fc307d2c7c324cccca7
ENV PROJ_GIT_HASH c31146bee252d5b8bf4dc0b35168ab5e3ddf94b9
ENV GEOS_GIT_HASH c54752f9d4d44e35ac4015cbb8dd47ddb36611bf
ENV GDAL_GIT_HASH 67eaa768c017a21200c7acd9c208d104efea512d
ENV PROJ_GIT_HASH 700721eeafd239112f289bba12d08fc8844c376d
ENV GEOS_GIT_HASH 7d20b1772d57c8eba1c12902c812dae9bf58307b
ENV GDAL_GIT_HASH 717dcc0eed252e2f78c142b1f7866e49c5511224

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

# install postgis
ENV POSTGIS_GIT_HASH 0a7d3bc20498532464c9064a4c75912f842f565f
ENV POSTGIS_GIT_HASH 1fc0c62f9bde0d09c6e716755980e159730c231d

RUN set -ex \
&& apt-get update \
Expand All @@ -335,6 +336,7 @@ RUN set -ex \
g++ \
git \
libboost-all-dev \
libcunit1-dev \
libcurl4-gnutls-dev \
libgmp-dev \
libjson-c-dev \
Expand Down Expand Up @@ -363,7 +365,7 @@ RUN set -ex \
&& ./configure \
# --with-gui \
--with-pcredir="$(pcre-config --prefix)" \
--with-lto \
--enable-lto \
&& make -j$(nproc) \
&& make install \
# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316
Expand Down
4 changes: 3 additions & 1 deletion 15-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

FROM postgres:15-bullseye

LABEL maintainer="PostGIS Project - https://postgis.net"
LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.2+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.3.2+dfsg-1.pgdg110+1
Expand Down
19 changes: 16 additions & 3 deletions 15-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:15-alpine3.17
FROM ${BASE_IMAGE}

FROM postgres:15-alpine3.17

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

ENV POSTGIS_VERSION 3.3.2
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
Expand Down Expand Up @@ -71,10 +73,12 @@ RUN set -eux \
autoconf \
automake \
clang-dev \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
Expand Down Expand Up @@ -105,8 +109,17 @@ RUN set -eux \
#&& 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 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 \
Expand Down
Loading

0 comments on commit b50183f

Please sign in to comment.