From 2cebc70633f93bdcce0dcda6f73233d9a216ab00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6rkem=20M=C3=BClayim?= Date: Tue, 9 Jul 2019 23:15:49 +0300 Subject: [PATCH 01/13] Fixes proj4 requirement problem for alpine images. --- 10-2.5/alpine/Dockerfile | 4 ++-- 11-2.5/alpine/Dockerfile | 10 +++++----- 9.4-2.5/alpine/Dockerfile | 10 +++++----- 9.5-2.5/alpine/Dockerfile | 4 ++-- 9.6-2.5/alpine/Dockerfile | 10 +++++----- Dockerfile.alpine.template | 10 +++++----- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/10-2.5/alpine/Dockerfile b/10-2.5/alpine/Dockerfile index ada31ce2..6151aa18 100644 --- a/10-2.5/alpine/Dockerfile +++ b/10-2.5/alpine/Dockerfile @@ -36,7 +36,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -53,7 +53,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/11-2.5/alpine/Dockerfile b/11-2.5/alpine/Dockerfile index 7fec69b5..e220eee8 100644 --- a/11-2.5/alpine/Dockerfile +++ b/11-2.5/alpine/Dockerfile @@ -32,11 +32,11 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -49,11 +49,11 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index 44f2b42d..02890981 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -32,11 +32,11 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -49,11 +49,11 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.5-2.5/alpine/Dockerfile b/9.5-2.5/alpine/Dockerfile index 21bf5184..35bdd133 100644 --- a/9.5-2.5/alpine/Dockerfile +++ b/9.5-2.5/alpine/Dockerfile @@ -36,7 +36,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -53,7 +53,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.6-2.5/alpine/Dockerfile b/9.6-2.5/alpine/Dockerfile index fda65829..347a7058 100644 --- a/9.6-2.5/alpine/Dockerfile +++ b/9.6-2.5/alpine/Dockerfile @@ -32,11 +32,11 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -49,11 +49,11 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template index d3e5f34f..213e7180 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -32,11 +32,11 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ gdal-dev \ geos-dev \ - proj4-dev \ + proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -49,11 +49,11 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ - proj4 \ + proj \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ From 5f4470ed68508e7b26bfbae66a198d7e79ba9715 Mon Sep 17 00:00:00 2001 From: Thijs Damsma Date: Tue, 16 Jul 2019 15:33:05 +0200 Subject: [PATCH 02/13] add postgresql 12.0beta2 and postgis 3.0.0alpha3 --- 12.0beta2-3.0.0alpha3/alpine/Dockerfile | 62 +++++++++++++++++++ .../alpine/initdb-postgis.sh | 24 +++++++ .../alpine/update-postgis.sh | 28 +++++++++ 3 files changed, 114 insertions(+) create mode 100644 12.0beta2-3.0.0alpha3/alpine/Dockerfile create mode 100644 12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh create mode 100644 12.0beta2-3.0.0alpha3/alpine/update-postgis.sh diff --git a/12.0beta2-3.0.0alpha3/alpine/Dockerfile b/12.0beta2-3.0.0alpha3/alpine/Dockerfile new file mode 100644 index 00000000..2e34ac6a --- /dev/null +++ b/12.0beta2-3.0.0alpha3/alpine/Dockerfile @@ -0,0 +1,62 @@ +FROM postgres:12-beta2-alpine + +ENV POSTGIS_VERSION 3.0.0alpha3 +ENV POSTGIS_SHA256 b75e28139fe74158a27b7e7b2d1c2c0a7acb3abe8c60cfc72d45b0827dd12364 + +RUN set -ex \ + \ + && 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 \ + autoconf \ + automake \ + g++ \ + json-c-dev \ + libtool \ + libxml2-dev \ + make \ + perl \ + \ + && apk add --no-cache --virtual .build-deps-edge \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + gdal-dev \ + geos-dev \ + proj-dev \ + protobuf-c-dev \ + && cd /usr/src/postgis \ + && ./autogen.sh \ +# configure options taken from: +# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie + && ./configure \ +# --with-gui \ + && make \ + && make install \ + && apk add --no-cache --virtual .postgis-rundeps \ + json-c \ + && apk add --no-cache --virtual .postgis-rundeps-edge \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + geos \ + gdal \ + proj \ + protobuf-c \ + && cd / \ + && rm -rf /usr/src/postgis \ + && apk del .fetch-deps .build-deps .build-deps-edge + +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh +COPY ./update-postgis.sh /usr/local/bin diff --git a/12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh b/12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh new file mode 100644 index 00000000..d6b2e08f --- /dev/null +++ b/12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +# Perform all actions as $POSTGRES_USER +export PGUSER="$POSTGRES_USER" + +# Create the 'template_postgis' template db +"${psql[@]}" <<- 'EOSQL' +CREATE DATABASE template_postgis; +UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'; +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_raster; + CREATE EXTENSION IF NOT EXISTS postgis_topology; + CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; + CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; +EOSQL +done diff --git a/12.0beta2-3.0.0alpha3/alpine/update-postgis.sh b/12.0beta2-3.0.0alpha3/alpine/update-postgis.sh new file mode 100644 index 00000000..f98abd26 --- /dev/null +++ b/12.0beta2-3.0.0alpha3/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 From 483180ed5b1f74be5232cb0f87946bc2b56ebc81 Mon Sep 17 00:00:00 2001 From: Thijs Damsma Date: Tue, 16 Jul 2019 16:02:56 +0200 Subject: [PATCH 03/13] add to travic.yml, sort envs --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87b8b6c2..ebdb074e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,17 @@ services: docker dist: trusty env: + - VERSION=12.0beta2-3.0.0alpha3 VARIANT=alpine + - VERSION=11-2.5 + - VERSION=11-2.5 VARIANT=alpine + - VERSION=10-2.5 + - VERSION=10-2.5 VARIANT=alpine - VERSION=9.6-2.5 - VERSION=9.6-2.5 VARIANT=alpine - VERSION=9.5-2.5 - VERSION=9.5-2.5 VARIANT=alpine - VERSION=9.4-2.5 - VERSION=9.4-2.5 VARIANT=alpine - - VERSION=11-2.5 - - VERSION=11-2.5 VARIANT=alpine - - VERSION=10-2.5 - - VERSION=10-2.5 VARIANT=alpine install: - git clone https://github.com/docker-library/official-images.git ~/official-images From da8a3d8d5ab9122538d8a306c8c3ad386e073aa4 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 11:02:21 +0300 Subject: [PATCH 04/13] Add alpine image for Postgres 12 + PostGIS 3.0.0 --- .travis.yml | 2 +- {12.0beta2-3.0.0alpha3 => 12-3.0}/alpine/Dockerfile | 10 ++++++---- .../alpine/initdb-postgis.sh | 0 .../alpine/update-postgis.sh | 0 4 files changed, 7 insertions(+), 5 deletions(-) rename {12.0beta2-3.0.0alpha3 => 12-3.0}/alpine/Dockerfile (91%) rename {12.0beta2-3.0.0alpha3 => 12-3.0}/alpine/initdb-postgis.sh (100%) rename {12.0beta2-3.0.0alpha3 => 12-3.0}/alpine/update-postgis.sh (100%) diff --git a/.travis.yml b/.travis.yml index ebdb074e..ee93c5db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ services: docker dist: trusty env: - - VERSION=12.0beta2-3.0.0alpha3 VARIANT=alpine + - VERSION=12-3.0 VARIANT=alpine - VERSION=11-2.5 - VERSION=11-2.5 VARIANT=alpine - VERSION=10-2.5 diff --git a/12.0beta2-3.0.0alpha3/alpine/Dockerfile b/12-3.0/alpine/Dockerfile similarity index 91% rename from 12.0beta2-3.0.0alpha3/alpine/Dockerfile rename to 12-3.0/alpine/Dockerfile index 2e34ac6a..70883bd1 100644 --- a/12.0beta2-3.0.0alpha3/alpine/Dockerfile +++ b/12-3.0/alpine/Dockerfile @@ -1,7 +1,7 @@ -FROM postgres:12-beta2-alpine +FROM postgres:12-alpine -ENV POSTGIS_VERSION 3.0.0alpha3 -ENV POSTGIS_SHA256 b75e28139fe74158a27b7e7b2d1c2c0a7acb3abe8c60cfc72d45b0827dd12364 +ENV POSTGIS_VERSION 3.0.0 +ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 RUN set -ex \ \ @@ -23,7 +23,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -36,6 +35,8 @@ RUN set -ex \ gdal-dev \ geos-dev \ proj-dev \ + g++ \ + libstdc++ \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -53,6 +54,7 @@ RUN set -ex \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh b/12-3.0/alpine/initdb-postgis.sh similarity index 100% rename from 12.0beta2-3.0.0alpha3/alpine/initdb-postgis.sh rename to 12-3.0/alpine/initdb-postgis.sh diff --git a/12.0beta2-3.0.0alpha3/alpine/update-postgis.sh b/12-3.0/alpine/update-postgis.sh similarity index 100% rename from 12.0beta2-3.0.0alpha3/alpine/update-postgis.sh rename to 12-3.0/alpine/update-postgis.sh From b5bd4e0d1f35811c3cfa7550a931c46d51c2a3c2 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 11:20:44 +0300 Subject: [PATCH 05/13] Fix rest of alpine Dockerfiles --- 11-2.5/alpine/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/11-2.5/alpine/Dockerfile b/11-2.5/alpine/Dockerfile index e220eee8..27075be9 100644 --- a/11-2.5/alpine/Dockerfile +++ b/11-2.5/alpine/Dockerfile @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -34,6 +33,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps-edge \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -54,6 +54,7 @@ RUN set -ex \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ From 45269e80375884781a481cad4aca1de7ee89a4fc Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 11:45:35 +0300 Subject: [PATCH 06/13] Update the rest of the images --- .travis.yml | 18 ++++---- {10-2.5 => 10-3}/Dockerfile | 4 +- {11-2.5 => 10-3}/README.md | 2 +- {10-2.5 => 10-3}/alpine/Dockerfile | 13 +++--- {10-2.5 => 10-3}/alpine/initdb-postgis.sh | 0 {10-2.5 => 10-3}/alpine/update-postgis.sh | 0 {10-2.5 => 10-3}/initdb-postgis.sh | 0 {10-2.5 => 10-3}/update-postgis.sh | 0 {11-2.5 => 11-3}/Dockerfile | 4 +- {10-2.5 => 11-3}/README.md | 2 +- {11-2.5 => 11-3}/alpine/Dockerfile | 4 +- {11-2.5 => 11-3}/alpine/initdb-postgis.sh | 0 {11-2.5 => 11-3}/alpine/update-postgis.sh | 0 {11-2.5 => 11-3}/initdb-postgis.sh | 0 {11-2.5 => 11-3}/update-postgis.sh | 0 12-3/Dockerfile | 18 ++++++++ {9.5-2.5 => 12-3}/README.md | 2 +- {12-3.0 => 12-3}/alpine/Dockerfile | 9 ++-- {12-3.0 => 12-3}/alpine/initdb-postgis.sh | 0 {12-3.0 => 12-3}/alpine/update-postgis.sh | 0 {9.5-2.5/alpine => 12-3}/initdb-postgis.sh | 0 {9.5-2.5/alpine => 12-3}/update-postgis.sh | 0 9.4-2.5/Dockerfile | 6 ++- 9.4-2.5/README.md | 2 +- 9.4-2.5/alpine/Dockerfile | 3 +- {9.5-2.5 => 9.5-3}/Dockerfile | 4 +- {9.6-2.5 => 9.5-3}/README.md | 2 +- {9.5-2.5 => 9.5-3}/alpine/Dockerfile | 13 +++--- {9.5-2.5 => 9.5-3/alpine}/initdb-postgis.sh | 0 {9.5-2.5 => 9.5-3/alpine}/update-postgis.sh | 0 {9.6-2.5/alpine => 9.5-3}/initdb-postgis.sh | 0 {9.6-2.5/alpine => 9.5-3}/update-postgis.sh | 0 {9.6-2.5 => 9.6-3}/Dockerfile | 4 +- 9.6-3/README.md | 51 +++++++++++++++++++++ {9.6-2.5 => 9.6-3}/alpine/Dockerfile | 7 +-- {9.6-2.5 => 9.6-3/alpine}/initdb-postgis.sh | 0 {9.6-2.5 => 9.6-3/alpine}/update-postgis.sh | 0 9.6-3/initdb-postgis.sh | 23 ++++++++++ 9.6-3/update-postgis.sh | 28 +++++++++++ Dockerfile.alpine.template | 3 +- README.md | 2 +- 41 files changed, 175 insertions(+), 49 deletions(-) rename {10-2.5 => 10-3}/Dockerfile (89%) rename {11-2.5 => 10-3}/README.md (97%) rename {10-2.5 => 10-3}/alpine/Dockerfile (92%) rename {10-2.5 => 10-3}/alpine/initdb-postgis.sh (100%) rename {10-2.5 => 10-3}/alpine/update-postgis.sh (100%) rename {10-2.5 => 10-3}/initdb-postgis.sh (100%) rename {10-2.5 => 10-3}/update-postgis.sh (100%) rename {11-2.5 => 11-3}/Dockerfile (89%) rename {10-2.5 => 11-3}/README.md (97%) rename {11-2.5 => 11-3}/alpine/Dockerfile (94%) rename {11-2.5 => 11-3}/alpine/initdb-postgis.sh (100%) rename {11-2.5 => 11-3}/alpine/update-postgis.sh (100%) rename {11-2.5 => 11-3}/initdb-postgis.sh (100%) rename {11-2.5 => 11-3}/update-postgis.sh (100%) create mode 100644 12-3/Dockerfile rename {9.5-2.5 => 12-3}/README.md (97%) rename {12-3.0 => 12-3}/alpine/Dockerfile (96%) rename {12-3.0 => 12-3}/alpine/initdb-postgis.sh (100%) rename {12-3.0 => 12-3}/alpine/update-postgis.sh (100%) rename {9.5-2.5/alpine => 12-3}/initdb-postgis.sh (100%) rename {9.5-2.5/alpine => 12-3}/update-postgis.sh (100%) rename {9.5-2.5 => 9.5-3}/Dockerfile (89%) rename {9.6-2.5 => 9.5-3}/README.md (97%) rename {9.5-2.5 => 9.5-3}/alpine/Dockerfile (92%) rename {9.5-2.5 => 9.5-3/alpine}/initdb-postgis.sh (100%) rename {9.5-2.5 => 9.5-3/alpine}/update-postgis.sh (100%) rename {9.6-2.5/alpine => 9.5-3}/initdb-postgis.sh (100%) rename {9.6-2.5/alpine => 9.5-3}/update-postgis.sh (100%) rename {9.6-2.5 => 9.6-3}/Dockerfile (89%) create mode 100644 9.6-3/README.md rename {9.6-2.5 => 9.6-3}/alpine/Dockerfile (93%) rename {9.6-2.5 => 9.6-3/alpine}/initdb-postgis.sh (100%) rename {9.6-2.5 => 9.6-3/alpine}/update-postgis.sh (100%) create mode 100644 9.6-3/initdb-postgis.sh create mode 100755 9.6-3/update-postgis.sh diff --git a/.travis.yml b/.travis.yml index ee93c5db..8d78c337 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,15 @@ services: docker dist: trusty env: - - VERSION=12-3.0 VARIANT=alpine - - VERSION=11-2.5 - - VERSION=11-2.5 VARIANT=alpine - - VERSION=10-2.5 - - VERSION=10-2.5 VARIANT=alpine - - VERSION=9.6-2.5 - - VERSION=9.6-2.5 VARIANT=alpine - - VERSION=9.5-2.5 - - VERSION=9.5-2.5 VARIANT=alpine + - VERSION=12-3 VARIANT=alpine + - VERSION=11-3 + - VERSION=11-3 VARIANT=alpine + - VERSION=10-3 + - VERSION=10-3 VARIANT=alpine + - VERSION=9.6-3 + - VERSION=9.6-3 VARIANT=alpine + - VERSION=9.5-3 + - VERSION=9.5-3 VARIANT=alpine - VERSION=9.4-2.5 - VERSION=9.4-2.5 VARIANT=alpine diff --git a/10-2.5/Dockerfile b/10-3/Dockerfile similarity index 89% rename from 10-2.5/Dockerfile rename to 10-3/Dockerfile index c2b78f53..3d42d137 100644 --- a/10-2.5/Dockerfile +++ b/10-3/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:10 MAINTAINER Mike Dillon -ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1 +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/11-2.5/README.md b/10-3/README.md similarity index 97% rename from 11-2.5/README.md rename to 10-3/README.md index 8a064afb..fddda30a 100644 --- a/11-2.5/README.md +++ b/10-3/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/10-2.5/alpine/Dockerfile b/10-3/alpine/Dockerfile similarity index 92% rename from 10-2.5/alpine/Dockerfile rename to 10-3/alpine/Dockerfile index 6151aa18..89777cc9 100644 --- a/10-2.5/alpine/Dockerfile +++ b/10-3/alpine/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:10-alpine MAINTAINER Régis Belson -ENV POSTGIS_VERSION 2.5.2 -ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9 +ENV POSTGIS_VERSION 3.0.0 +ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 RUN set -ex \ \ @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -32,8 +31,9 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -49,11 +49,12 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/10-2.5/alpine/initdb-postgis.sh b/10-3/alpine/initdb-postgis.sh similarity index 100% rename from 10-2.5/alpine/initdb-postgis.sh rename to 10-3/alpine/initdb-postgis.sh diff --git a/10-2.5/alpine/update-postgis.sh b/10-3/alpine/update-postgis.sh similarity index 100% rename from 10-2.5/alpine/update-postgis.sh rename to 10-3/alpine/update-postgis.sh diff --git a/10-2.5/initdb-postgis.sh b/10-3/initdb-postgis.sh similarity index 100% rename from 10-2.5/initdb-postgis.sh rename to 10-3/initdb-postgis.sh diff --git a/10-2.5/update-postgis.sh b/10-3/update-postgis.sh similarity index 100% rename from 10-2.5/update-postgis.sh rename to 10-3/update-postgis.sh diff --git a/11-2.5/Dockerfile b/11-3/Dockerfile similarity index 89% rename from 11-2.5/Dockerfile rename to 11-3/Dockerfile index 381480ca..0b8b1b0a 100644 --- a/11-2.5/Dockerfile +++ b/11-3/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:11 MAINTAINER Mike Dillon -ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1 +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/10-2.5/README.md b/11-3/README.md similarity index 97% rename from 10-2.5/README.md rename to 11-3/README.md index 8a064afb..fddda30a 100644 --- a/10-2.5/README.md +++ b/11-3/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/11-2.5/alpine/Dockerfile b/11-3/alpine/Dockerfile similarity index 94% rename from 11-2.5/alpine/Dockerfile rename to 11-3/alpine/Dockerfile index 27075be9..15854545 100644 --- a/11-2.5/alpine/Dockerfile +++ b/11-3/alpine/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:11-alpine MAINTAINER Régis Belson -ENV POSTGIS_VERSION 2.5.2 -ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9 +ENV POSTGIS_VERSION 3.0.0 +ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 RUN set -ex \ \ diff --git a/11-2.5/alpine/initdb-postgis.sh b/11-3/alpine/initdb-postgis.sh similarity index 100% rename from 11-2.5/alpine/initdb-postgis.sh rename to 11-3/alpine/initdb-postgis.sh diff --git a/11-2.5/alpine/update-postgis.sh b/11-3/alpine/update-postgis.sh similarity index 100% rename from 11-2.5/alpine/update-postgis.sh rename to 11-3/alpine/update-postgis.sh diff --git a/11-2.5/initdb-postgis.sh b/11-3/initdb-postgis.sh similarity index 100% rename from 11-2.5/initdb-postgis.sh rename to 11-3/initdb-postgis.sh diff --git a/11-2.5/update-postgis.sh b/11-3/update-postgis.sh similarity index 100% rename from 11-2.5/update-postgis.sh rename to 11-3/update-postgis.sh diff --git a/12-3/Dockerfile b/12-3/Dockerfile new file mode 100644 index 00000000..d69cbf13 --- /dev/null +++ b/12-3/Dockerfile @@ -0,0 +1,18 @@ +FROM postgres:12 +MAINTAINER Mike Dillon + +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg100+1 + +RUN apt-get update \ + && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ + && apt-get install -y --no-install-recommends \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ + postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ + postgis=$POSTGIS_VERSION \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh +COPY ./update-postgis.sh /usr/local/bin + diff --git a/9.5-2.5/README.md b/12-3/README.md similarity index 97% rename from 9.5-2.5/README.md rename to 12-3/README.md index 8a064afb..fddda30a 100644 --- a/9.5-2.5/README.md +++ b/12-3/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/12-3.0/alpine/Dockerfile b/12-3/alpine/Dockerfile similarity index 96% rename from 12-3.0/alpine/Dockerfile rename to 12-3/alpine/Dockerfile index 70883bd1..9f328141 100644 --- a/12-3.0/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -30,13 +30,12 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ - g++ \ - libstdc++ \ protobuf-c-dev \ && cd /usr/src/postgis \ && ./autogen.sh \ @@ -49,8 +48,8 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ diff --git a/12-3.0/alpine/initdb-postgis.sh b/12-3/alpine/initdb-postgis.sh similarity index 100% rename from 12-3.0/alpine/initdb-postgis.sh rename to 12-3/alpine/initdb-postgis.sh diff --git a/12-3.0/alpine/update-postgis.sh b/12-3/alpine/update-postgis.sh similarity index 100% rename from 12-3.0/alpine/update-postgis.sh rename to 12-3/alpine/update-postgis.sh diff --git a/9.5-2.5/alpine/initdb-postgis.sh b/12-3/initdb-postgis.sh similarity index 100% rename from 9.5-2.5/alpine/initdb-postgis.sh rename to 12-3/initdb-postgis.sh diff --git a/9.5-2.5/alpine/update-postgis.sh b/12-3/update-postgis.sh similarity index 100% rename from 9.5-2.5/alpine/update-postgis.sh rename to 12-3/update-postgis.sh diff --git a/9.4-2.5/Dockerfile b/9.4-2.5/Dockerfile index 2ee20ffe..271efa45 100644 --- a/9.4-2.5/Dockerfile +++ b/9.4-2.5/Dockerfile @@ -2,14 +2,16 @@ FROM postgres:9.4 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1 +ENV POSTGIS_VERSION 2.5.3+dfsg-2.pgdg90+1 +# pgdg does not have postgis package that we need, settle for this one +ENV POSTGIS_DEBIAN_VERSION 2.3.1+dfsg-2 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ + postgis=$POSTGIS_DEBIAN_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/9.4-2.5/README.md b/9.4-2.5/README.md index 8a064afb..fddda30a 100644 --- a/9.4-2.5/README.md +++ b/9.4-2.5/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index 02890981..71d0fb90 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -34,6 +33,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps-edge \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -54,6 +54,7 @@ RUN set -ex \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.5-2.5/Dockerfile b/9.5-3/Dockerfile similarity index 89% rename from 9.5-2.5/Dockerfile rename to 9.5-3/Dockerfile index 4e107f35..428ab722 100644 --- a/9.5-2.5/Dockerfile +++ b/9.5-3/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:9.5 MAINTAINER Mike Dillon -ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1 +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/9.6-2.5/README.md b/9.5-3/README.md similarity index 97% rename from 9.6-2.5/README.md rename to 9.5-3/README.md index 8a064afb..fddda30a 100644 --- a/9.6-2.5/README.md +++ b/9.5-3/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/9.5-2.5/alpine/Dockerfile b/9.5-3/alpine/Dockerfile similarity index 92% rename from 9.5-2.5/alpine/Dockerfile rename to 9.5-3/alpine/Dockerfile index 35bdd133..028fc55a 100644 --- a/9.5-2.5/alpine/Dockerfile +++ b/9.5-3/alpine/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:9.5-alpine MAINTAINER Régis Belson -ENV POSTGIS_VERSION 2.5.2 -ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9 +ENV POSTGIS_VERSION 3.0.0 +ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 RUN set -ex \ \ @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -32,8 +31,9 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -49,11 +49,12 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.5-2.5/initdb-postgis.sh b/9.5-3/alpine/initdb-postgis.sh similarity index 100% rename from 9.5-2.5/initdb-postgis.sh rename to 9.5-3/alpine/initdb-postgis.sh diff --git a/9.5-2.5/update-postgis.sh b/9.5-3/alpine/update-postgis.sh similarity index 100% rename from 9.5-2.5/update-postgis.sh rename to 9.5-3/alpine/update-postgis.sh diff --git a/9.6-2.5/alpine/initdb-postgis.sh b/9.5-3/initdb-postgis.sh similarity index 100% rename from 9.6-2.5/alpine/initdb-postgis.sh rename to 9.5-3/initdb-postgis.sh diff --git a/9.6-2.5/alpine/update-postgis.sh b/9.5-3/update-postgis.sh similarity index 100% rename from 9.6-2.5/alpine/update-postgis.sh rename to 9.5-3/update-postgis.sh diff --git a/9.6-2.5/Dockerfile b/9.6-3/Dockerfile similarity index 89% rename from 9.6-2.5/Dockerfile rename to 9.6-3/Dockerfile index 9bdcbd6b..fa270765 100644 --- a/9.6-2.5/Dockerfile +++ b/9.6-3/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:9.6 MAINTAINER Mike Dillon -ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1 +ENV POSTGIS_MAJOR 3 +ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/9.6-3/README.md b/9.6-3/README.md new file mode 100644 index 00000000..fddda30a --- /dev/null +++ b/9.6-3/README.md @@ -0,0 +1,51 @@ +# mdillon/postgis + +[![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 + +This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: + +* `postgis` +* `postgis_topology` +* `fuzzystrmatch` +* `postgis_tiger_geocoder` + +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`. + +## Usage + +In order to run a basic container capable of serving a PostGIS-enabled database, start a container as follows: + + docker run --name some-postgis -e POSTGRES_PASSWORD=mysecretpassword -d mdillon/postgis + +For more detailed instructions about how to start and control your Postgres container, see the documentation for the `postgres` image [here](https://registry.hub.docker.com/_/postgres/). + +Once you have started a database container, you can then connect to the database as follows: + + docker run -it --link some-postgis:postgres --rm postgres \ + sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres' + +See [the PostGIS documentation](http://postgis.net/docs/postgis_installation.html#create_new_db_extensions) for more details on your options for creating and using a spatially-enabled database. + +## Known Issues / Errors + +When You encouter errors due to PostGIS update `OperationalError: could not access file "$libdir/postgis-X.X`, run: + +`docker exec some-postgis update-postgis.sh` + +It will update to Your newest PostGIS. Update is idempotent, so it won't hurt when You run it more than once, You will get notification like: + +``` +Updating PostGIS extensions template_postgis to X.X.X +NOTICE: version "X.X.X" of extension "postgis" is already installed +NOTICE: version "X.X.X" of extension "postgis_topology" is already installed +NOTICE: version "X.X.X" of extension "postgis_tiger_geocoder" is already installed +ALTER EXTENSION +Updating PostGIS extensions docker to X.X.X +NOTICE: version "X.X.X" of extension "postgis" is already installed +NOTICE: version "X.X.X" of extension "postgis_topology" is already installed +NOTICE: version "X.X.X" of extension "postgis_tiger_geocoder" is already installed +ALTER EXTENSION +``` + diff --git a/9.6-2.5/alpine/Dockerfile b/9.6-3/alpine/Dockerfile similarity index 93% rename from 9.6-2.5/alpine/Dockerfile rename to 9.6-3/alpine/Dockerfile index 347a7058..d90b386a 100644 --- a/9.6-2.5/alpine/Dockerfile +++ b/9.6-3/alpine/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:9.6-alpine MAINTAINER Régis Belson -ENV POSTGIS_VERSION 2.5.2 -ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9 +ENV POSTGIS_VERSION 3.0.0 +ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 RUN set -ex \ \ @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -34,6 +33,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps-edge \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -54,6 +54,7 @@ RUN set -ex \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/9.6-2.5/initdb-postgis.sh b/9.6-3/alpine/initdb-postgis.sh similarity index 100% rename from 9.6-2.5/initdb-postgis.sh rename to 9.6-3/alpine/initdb-postgis.sh diff --git a/9.6-2.5/update-postgis.sh b/9.6-3/alpine/update-postgis.sh similarity index 100% rename from 9.6-2.5/update-postgis.sh rename to 9.6-3/alpine/update-postgis.sh diff --git a/9.6-3/initdb-postgis.sh b/9.6-3/initdb-postgis.sh new file mode 100644 index 00000000..43012885 --- /dev/null +++ b/9.6-3/initdb-postgis.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +# Perform all actions as $POSTGRES_USER +export PGUSER="$POSTGRES_USER" + +# Create the 'template_postgis' template db +"${psql[@]}" <<- 'EOSQL' +CREATE DATABASE template_postgis; +UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'; +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; + CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; + CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; +EOSQL +done diff --git a/9.6-3/update-postgis.sh b/9.6-3/update-postgis.sh new file mode 100755 index 00000000..f98abd26 --- /dev/null +++ b/9.6-3/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/Dockerfile.alpine.template b/Dockerfile.alpine.template index 213e7180..b4f443a0 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -24,7 +24,6 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ - g++ \ json-c-dev \ libtool \ libxml2-dev \ @@ -34,6 +33,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps-edge \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + g++ \ gdal-dev \ geos-dev \ proj-dev \ @@ -54,6 +54,7 @@ RUN set -ex \ geos \ gdal \ proj \ + libstdc++ \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ diff --git a/README.md b/README.md index 8a064afb..fddda30a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: From 7390356c97fc7799487b3390138f1425e2cbcf86 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Wed, 23 Oct 2019 17:17:14 +0300 Subject: [PATCH 07/13] Update ReadMe --- 10-3/README.md | 4 +++- 11-3/README.md | 4 +++- 12-3/README.md | 4 +++- 9.4-2.5/README.md | 4 +++- 9.5-3/README.md | 4 +++- 9.6-3/README.md | 4 +++- README.md | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/10-3/README.md b/10-3/README.md index fddda30a..38f704a3 100644 --- a/10-3/README.md +++ b/10-3/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/11-3/README.md b/11-3/README.md index fddda30a..38f704a3 100644 --- a/11-3/README.md +++ b/11-3/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/12-3/README.md b/12-3/README.md index fddda30a..38f704a3 100644 --- a/12-3/README.md +++ b/12-3/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/9.4-2.5/README.md b/9.4-2.5/README.md index fddda30a..38f704a3 100644 --- a/9.4-2.5/README.md +++ b/9.4-2.5/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/9.5-3/README.md b/9.5-3/README.md index fddda30a..38f704a3 100644 --- a/9.5-3/README.md +++ b/9.5-3/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/9.6-3/README.md b/9.6-3/README.md index fddda30a..38f704a3 100644 --- a/9.6-3/README.md +++ b/9.6-3/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: diff --git a/README.md b/README.md index fddda30a..38f704a3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ [![Build Status](https://travis-ci.org/appropriate/docker-postgis.svg)](https://travis-ci.org/appropriate/docker-postgis) [![Join the chat at https://gitter.im/appropriate/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/appropriate/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 2.5](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, and Postgres 11. It also provides a Docker image with Postgres 12 and PostGIS 3.0 +The `mdillon/postgis` image provides a Docker container running Postgres with [PostGIS 3.0](http://postgis.net/) installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides variants for each version of Postgres 9 supported by the base image (9.4-9.6), and Postgres 10-12. + +Note that Postgres 9.4 image runs with PostGIS 2.5. This image ensures that the default database created by the parent `postgres` image will have the following extensions installed: From 8352e431328f7d3a8f33263dda17ccf3d2fea345 Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Sat, 7 Dec 2019 16:00:47 +0300 Subject: [PATCH 08/13] Update alpine Dockerfile to use community repo --- 10-3/alpine/Dockerfile | 4 ++-- 11-3/alpine/Dockerfile | 4 ++-- 12-3/alpine/Dockerfile | 4 ++-- 9.4-2.5/alpine/Dockerfile | 4 ++-- 9.5-3/alpine/Dockerfile | 4 ++-- 9.6-3/alpine/Dockerfile | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/10-3/alpine/Dockerfile b/10-3/alpine/Dockerfile index 89777cc9..e4c7ec35 100644 --- a/10-3/alpine/Dockerfile +++ b/10-3/alpine/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -49,7 +49,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ diff --git a/11-3/alpine/Dockerfile b/11-3/alpine/Dockerfile index 15854545..685aa6e1 100644 --- a/11-3/alpine/Dockerfile +++ b/11-3/alpine/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -49,7 +49,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ diff --git a/12-3/alpine/Dockerfile b/12-3/alpine/Dockerfile index 9f328141..fdd8c4bd 100644 --- a/12-3/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -48,7 +48,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index 71d0fb90..d68459c5 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -49,7 +49,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ diff --git a/9.5-3/alpine/Dockerfile b/9.5-3/alpine/Dockerfile index 028fc55a..bdde42e3 100644 --- a/9.5-3/alpine/Dockerfile +++ b/9.5-3/alpine/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -49,7 +49,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ diff --git a/9.6-3/alpine/Dockerfile b/9.6-3/alpine/Dockerfile index d90b386a..6fbc627f 100644 --- a/9.6-3/alpine/Dockerfile +++ b/9.6-3/alpine/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ perl \ \ && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ gdal-dev \ @@ -49,7 +49,7 @@ RUN set -ex \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ + --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ From 726bdf6ef2027bbc6ccd4682f7b3a493280ebe1c Mon Sep 17 00:00:00 2001 From: Eldar Yusupov Date: Sat, 7 Dec 2019 16:03:51 +0300 Subject: [PATCH 09/13] Add gcc build dependency for Alpine images --- 10-3/alpine/Dockerfile | 1 + 11-3/alpine/Dockerfile | 1 + 12-3/alpine/Dockerfile | 1 + 9.4-2.5/alpine/Dockerfile | 1 + 9.5-3/alpine/Dockerfile | 1 + 9.6-3/alpine/Dockerfile | 1 + 6 files changed, 6 insertions(+) diff --git a/10-3/alpine/Dockerfile b/10-3/alpine/Dockerfile index e4c7ec35..57926492 100644 --- a/10-3/alpine/Dockerfile +++ b/10-3/alpine/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ diff --git a/11-3/alpine/Dockerfile b/11-3/alpine/Dockerfile index 685aa6e1..0ce77c53 100644 --- a/11-3/alpine/Dockerfile +++ b/11-3/alpine/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ diff --git a/12-3/alpine/Dockerfile b/12-3/alpine/Dockerfile index fdd8c4bd..1166d838 100644 --- a/12-3/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index d68459c5..fd2907cf 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ diff --git a/9.5-3/alpine/Dockerfile b/9.5-3/alpine/Dockerfile index bdde42e3..b235b8b5 100644 --- a/9.5-3/alpine/Dockerfile +++ b/9.5-3/alpine/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ diff --git a/9.6-3/alpine/Dockerfile b/9.6-3/alpine/Dockerfile index 6fbc627f..cada8dd6 100644 --- a/9.6-3/alpine/Dockerfile +++ b/9.6-3/alpine/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ g++ \ + gcc \ gdal-dev \ geos-dev \ proj-dev \ From 80af2955a8f1979c2d13ebcd5e06586463772668 Mon Sep 17 00:00:00 2001 From: Taro Matsuzawa Date: Tue, 7 Jan 2020 17:06:29 +0900 Subject: [PATCH 10/13] supports alpine v3.11 --- 12-3/alpine/Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/12-3/alpine/Dockerfile b/12-3/alpine/Dockerfile index 1166d838..dc48c683 100644 --- a/12-3/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -23,19 +23,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -48,9 +47,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -58,7 +54,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin From 1c412ca0b0418a0b39805563470809ed78937f53 Mon Sep 17 00:00:00 2001 From: Taro Matsuzawa Date: Fri, 31 Jan 2020 03:06:55 +0900 Subject: [PATCH 11/13] - alpine template update for alpine v3.11 - remove streath and add buster to support current postgres images - run update.sh again --- .travis.yml | 11 ++++++----- 10-3/Dockerfile | 2 +- 10-3/alpine/Dockerfile | 12 ++++-------- 11-3/Dockerfile | 2 +- 11-3/alpine/Dockerfile | 12 ++++-------- 12-3/Dockerfile | 2 +- 12-3/alpine/Dockerfile | 1 + 12-3/alpine/initdb-postgis.sh | 1 - 9.4-2.5/Dockerfile | 6 ++---- 9.4-2.5/alpine/Dockerfile | 16 ++++++---------- 9.5-3/Dockerfile | 2 +- 9.5-3/alpine/Dockerfile | 12 ++++-------- 9.6-3/Dockerfile | 2 +- 9.6-3/alpine/Dockerfile | 12 ++++-------- Dockerfile.alpine.template | 13 +++++-------- update.sh | 14 +++++++------- 16 files changed, 48 insertions(+), 72 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d78c337..47434fc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,17 +5,18 @@ services: docker dist: trusty env: - - VERSION=12-3 VARIANT=alpine - - VERSION=11-3 - - VERSION=11-3 VARIANT=alpine - - VERSION=10-3 - - VERSION=10-3 VARIANT=alpine - VERSION=9.6-3 - VERSION=9.6-3 VARIANT=alpine - VERSION=9.5-3 - VERSION=9.5-3 VARIANT=alpine - VERSION=9.4-2.5 - VERSION=9.4-2.5 VARIANT=alpine + - VERSION=12-3 + - VERSION=12-3 VARIANT=alpine + - VERSION=11-3 + - VERSION=11-3 VARIANT=alpine + - VERSION=10-3 + - VERSION=10-3 VARIANT=alpine install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/10-3/Dockerfile b/10-3/Dockerfile index 3d42d137..a482949e 100644 --- a/10-3/Dockerfile +++ b/10-3/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:10 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 +ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/10-3/alpine/Dockerfile b/10-3/alpine/Dockerfile index 57926492..09365d16 100644 --- a/10-3/alpine/Dockerfile +++ b/10-3/alpine/Dockerfile @@ -24,19 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -49,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -59,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/11-3/Dockerfile b/11-3/Dockerfile index 0b8b1b0a..f742f252 100644 --- a/11-3/Dockerfile +++ b/11-3/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:11 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 +ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/11-3/alpine/Dockerfile b/11-3/alpine/Dockerfile index 0ce77c53..33fff48b 100644 --- a/11-3/alpine/Dockerfile +++ b/11-3/alpine/Dockerfile @@ -24,19 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -49,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -59,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/12-3/Dockerfile b/12-3/Dockerfile index d69cbf13..ad06cc68 100644 --- a/12-3/Dockerfile +++ b/12-3/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:12 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg100+1 +ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg100+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/12-3/alpine/Dockerfile b/12-3/alpine/Dockerfile index dc48c683..2d58c975 100644 --- a/12-3/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -1,4 +1,5 @@ FROM postgres:12-alpine +MAINTAINER Régis Belson ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/12-3/alpine/initdb-postgis.sh b/12-3/alpine/initdb-postgis.sh index d6b2e08f..43012885 100644 --- a/12-3/alpine/initdb-postgis.sh +++ b/12-3/alpine/initdb-postgis.sh @@ -16,7 +16,6 @@ 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_raster; CREATE EXTENSION IF NOT EXISTS postgis_topology; CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; diff --git a/9.4-2.5/Dockerfile b/9.4-2.5/Dockerfile index 271efa45..58e77d4c 100644 --- a/9.4-2.5/Dockerfile +++ b/9.4-2.5/Dockerfile @@ -2,16 +2,14 @@ FROM postgres:9.4 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 2.5 -ENV POSTGIS_VERSION 2.5.3+dfsg-2.pgdg90+1 -# pgdg does not have postgis package that we need, settle for this one -ENV POSTGIS_DEBIAN_VERSION 2.3.1+dfsg-2 +ENV POSTGIS_VERSION 2.5.3+dfsg-3.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_DEBIAN_VERSION \ + postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index fd2907cf..fd80835d 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -1,8 +1,8 @@ FROM postgres:9.4-alpine MAINTAINER Régis Belson -ENV POSTGIS_VERSION 2.5.2 -ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9 +ENV POSTGIS_VERSION 2.5.3 +ENV POSTGIS_SHA256 402323c83d97f3859bc9083345dd687f933c261efe0830e1262c20c12671f794 RUN set -ex \ \ @@ -24,19 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -49,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -59,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/9.5-3/Dockerfile b/9.5-3/Dockerfile index 428ab722..367659cd 100644 --- a/9.5-3/Dockerfile +++ b/9.5-3/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:9.5 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 +ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/9.5-3/alpine/Dockerfile b/9.5-3/alpine/Dockerfile index b235b8b5..b7a1af4e 100644 --- a/9.5-3/alpine/Dockerfile +++ b/9.5-3/alpine/Dockerfile @@ -24,19 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -49,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -59,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/9.6-3/Dockerfile b/9.6-3/Dockerfile index fa270765..36384782 100644 --- a/9.6-3/Dockerfile +++ b/9.6-3/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:9.6 MAINTAINER Mike Dillon ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.0.0+dfsg-1.pgdg90+1 +ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 RUN apt-get update \ && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ diff --git a/9.6-3/alpine/Dockerfile b/9.6-3/alpine/Dockerfile index cada8dd6..46b30e3f 100644 --- a/9.6-3/alpine/Dockerfile +++ b/9.6-3/alpine/Dockerfile @@ -24,19 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -49,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -59,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template index b4f443a0..785d42db 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -24,18 +24,18 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ autoconf \ automake \ + file \ json-c-dev \ libtool \ libxml2-dev \ make \ perl \ - \ - && apk add --no-cache --virtual .build-deps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ + clang-dev \ g++ \ + gcc \ gdal-dev \ geos-dev \ + llvm9-dev \ proj-dev \ protobuf-c-dev \ && cd /usr/src/postgis \ @@ -48,9 +48,6 @@ RUN set -ex \ && make install \ && apk add --no-cache --virtual .postgis-rundeps \ json-c \ - && apk add --no-cache --virtual .postgis-rundeps-edge \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \ - --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ geos \ gdal \ proj \ @@ -58,7 +55,7 @@ RUN set -ex \ protobuf-c \ && cd / \ && rm -rf /usr/src/postgis \ - && apk del .fetch-deps .build-deps .build-deps-edge + && apk del .fetch-deps .build-deps COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh COPY ./update-postgis.sh /usr/local/bin diff --git a/update.sh b/update.sh index 42a16481..7b7296da 100755 --- a/update.sh +++ b/update.sh @@ -10,19 +10,19 @@ if [ ${#versions[@]} -eq 0 ]; then fi versions=( "${versions[@]%/Dockerfile}" ) -packagesUrlJessie='http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/main/binary-amd64/Packages' -packagesJessie="$(echo "$packagesUrlJessie" | sed -r 's/[^a-zA-Z.-]+/-/g')" -curl -sSL "${packagesUrlJessie}.bz2" | bunzip2 > "$packagesJessie" - packagesUrlStretch='http://apt.postgresql.org/pub/repos/apt/dists/stretch-pgdg/main/binary-amd64/Packages' packagesStretch="$(echo "$packagesUrlStretch" | sed -r 's/[^a-zA-Z.-]+/-/g')" curl -sSL "${packagesUrlStretch}.bz2" | bunzip2 > "$packagesStretch" +packagesUrlBuster='http://apt.postgresql.org/pub/repos/apt/dists/buster-pgdg/main/binary-amd64/Packages' +packagesBuster="$(echo "$packagesUrlBuster" | sed -r 's/[^a-zA-Z.-]+/-/g')" +curl -sSL "${packagesUrlBuster}.bz2" | bunzip2 > "$packagesBuster" + travisEnv= for version in "${versions[@]}"; do IFS=- read pg_major postgis_major <<< "$version" - if [[ $pg_major = 9* ]]; then - packages="$packagesStretch" + if [[ $pg_major = 12 ]]; then + packages="$packagesBuster" else packages="$packagesStretch" fi @@ -56,5 +56,5 @@ done travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)" echo "$travis" > .travis.yml -rm "$packagesJessie" rm "$packagesStretch" +rm "$packagesBuster" From d5421794244bdf21781269e1c8e1da9f8f38e46c Mon Sep 17 00:00:00 2001 From: Taro Matsuzawa Date: Fri, 31 Jan 2020 03:45:42 +0900 Subject: [PATCH 12/13] - fixes: postgis-2.5 can't install from current packages - fixes: MAINTENER is duprecated --- 10-3/Dockerfile | 3 +-- 10-3/alpine/Dockerfile | 2 +- 11-3/Dockerfile | 3 +-- 11-3/alpine/Dockerfile | 2 +- 12-3/Dockerfile | 3 +-- 12-3/alpine/Dockerfile | 2 +- 9.4-2.5/Dockerfile | 3 +-- 9.4-2.5/alpine/Dockerfile | 2 +- 9.5-3/Dockerfile | 3 +-- 9.5-3/alpine/Dockerfile | 2 +- 9.6-3/Dockerfile | 3 +-- 9.6-3/alpine/Dockerfile | 2 +- Dockerfile.alpine.template | 2 +- Dockerfile.template | 3 +-- 14 files changed, 14 insertions(+), 21 deletions(-) diff --git a/10-3/Dockerfile b/10-3/Dockerfile index a482949e..c070d6fc 100644 --- a/10-3/Dockerfile +++ b/10-3/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:10 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/10-3/alpine/Dockerfile b/10-3/alpine/Dockerfile index 09365d16..630bd9a8 100644 --- a/10-3/alpine/Dockerfile +++ b/10-3/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:10-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/11-3/Dockerfile b/11-3/Dockerfile index f742f252..6dd1514e 100644 --- a/11-3/Dockerfile +++ b/11-3/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:11 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/11-3/alpine/Dockerfile b/11-3/alpine/Dockerfile index 33fff48b..71cba510 100644 --- a/11-3/alpine/Dockerfile +++ b/11-3/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:11-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/12-3/Dockerfile b/12-3/Dockerfile index ad06cc68..fe50a591 100644 --- a/12-3/Dockerfile +++ b/12-3/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:12 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg100+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/12-3/alpine/Dockerfile b/12-3/alpine/Dockerfile index 2d58c975..a378bc80 100644 --- a/12-3/alpine/Dockerfile +++ b/12-3/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:12-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/9.4-2.5/Dockerfile b/9.4-2.5/Dockerfile index 58e77d4c..237fab6f 100644 --- a/9.4-2.5/Dockerfile +++ b/9.4-2.5/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.4 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 2.5 ENV POSTGIS_VERSION 2.5.3+dfsg-3.pgdg90+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/9.4-2.5/alpine/Dockerfile b/9.4-2.5/alpine/Dockerfile index fd80835d..d946df50 100644 --- a/9.4-2.5/alpine/Dockerfile +++ b/9.4-2.5/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.4-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 2.5.3 ENV POSTGIS_SHA256 402323c83d97f3859bc9083345dd687f933c261efe0830e1262c20c12671f794 diff --git a/9.5-3/Dockerfile b/9.5-3/Dockerfile index 367659cd..c9f595b5 100644 --- a/9.5-3/Dockerfile +++ b/9.5-3/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.5 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/9.5-3/alpine/Dockerfile b/9.5-3/alpine/Dockerfile index b7a1af4e..1fd781e8 100644 --- a/9.5-3/alpine/Dockerfile +++ b/9.5-3/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.5-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/9.6-3/Dockerfile b/9.6-3/Dockerfile index 36384782..c6836b29 100644 --- a/9.6-3/Dockerfile +++ b/9.6-3/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.6 -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR 3 ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg90+1 @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d diff --git a/9.6-3/alpine/Dockerfile b/9.6-3/alpine/Dockerfile index 46b30e3f..2fa8d8d1 100644 --- a/9.6-3/alpine/Dockerfile +++ b/9.6-3/alpine/Dockerfile @@ -1,5 +1,5 @@ FROM postgres:9.6-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION 3.0.0 ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123 diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template index 785d42db..bcd3cf3f 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -1,5 +1,5 @@ FROM postgres:%%PG_MAJOR%%-alpine -MAINTAINER Régis Belson +LABEL maintainer="Régis Belson " ENV POSTGIS_VERSION %%POSTGIS_VERSION%% ENV POSTGIS_SHA256 %%POSTGIS_SHA256%% diff --git a/Dockerfile.template b/Dockerfile.template index 8f8b6191..2b06a75e 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,5 +1,5 @@ FROM postgres:%%PG_MAJOR%% -MAINTAINER Mike Dillon +LABEL maintainer="Mike Dillon " ENV POSTGIS_MAJOR %%POSTGIS_MAJOR%% ENV POSTGIS_VERSION %%POSTGIS_VERSION%% @@ -9,7 +9,6 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ - postgis=$POSTGIS_VERSION \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /docker-entrypoint-initdb.d From 5345e730339788be4ad169f8452f9c3482a3b86f Mon Sep 17 00:00:00 2001 From: Taro Matsuzawa Date: Thu, 6 Feb 2020 11:19:01 +0900 Subject: [PATCH 13/13] added travis_retry to fix fail docker's wget command --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 47434fc5..f228bbfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,5 +27,5 @@ before_script: - image="appropriate/postgis:$VERSION${VARIANT:+-${VARIANT}}" script: - - docker build --pull -t "$image" . + - travis_retry docker build --pull -t "$image" . - ~/official-images/test/run.sh -c ~/official-images/test/config.sh -c "../${VARIANT:+../}test/postgis-config.sh" "$image"