Skip to content

Postgres 12 + postgis 3 #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ services: docker
dist: trusty

env:
- 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.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=11-2.5
- VERSION=11-2.5 VARIANT=alpine
- VERSION=10-2.5
- VERSION=10-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
Expand All @@ -25,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"
7 changes: 3 additions & 4 deletions 10-2.5/Dockerfile → 10-3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM postgres:10
MAINTAINER Mike Dillon <[email protected]>
LABEL maintainer="Mike Dillon <[email protected]>"

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-2~exp1.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_VERSION \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /docker-entrypoint-initdb.d
Expand Down
4 changes: 3 additions & 1 deletion 11-2.5/README.md → 10-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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:

Expand Down
26 changes: 12 additions & 14 deletions 10-2.5/alpine/Dockerfile → 10-3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM postgres:10-alpine
MAINTAINER Régis Belson <[email protected]>
LABEL maintainer="Régis Belson <[email protected]>"

ENV POSTGIS_VERSION 2.5.2
ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9
ENV POSTGIS_VERSION 3.0.0
ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123

RUN set -ex \
\
Expand All @@ -24,19 +24,19 @@ RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
g++ \
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 \
proj4-dev \
llvm9-dev \
proj-dev \
protobuf-c-dev \
&& cd /usr/src/postgis \
&& ./autogen.sh \
Expand All @@ -48,16 +48,14 @@ 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 \
proj4 \
proj \
libstdc++ \
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions 11-2.5/Dockerfile → 11-3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM postgres:11
MAINTAINER Mike Dillon <[email protected]>
LABEL maintainer="Mike Dillon <[email protected]>"

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-2~exp1.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_VERSION \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /docker-entrypoint-initdb.d
Expand Down
4 changes: 3 additions & 1 deletion 10-2.5/README.md → 11-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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:

Expand Down
26 changes: 12 additions & 14 deletions 11-2.5/alpine/Dockerfile → 11-3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM postgres:11-alpine
MAINTAINER Régis Belson <[email protected]>
LABEL maintainer="Régis Belson <[email protected]>"

ENV POSTGIS_VERSION 2.5.2
ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9
ENV POSTGIS_VERSION 3.0.0
ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123

RUN set -ex \
\
Expand All @@ -24,19 +24,19 @@ RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
g++ \
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 \
proj4-dev \
llvm9-dev \
proj-dev \
protobuf-c-dev \
&& cd /usr/src/postgis \
&& ./autogen.sh \
Expand All @@ -48,16 +48,14 @@ 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 \
proj4 \
proj \
libstdc++ \
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions 12-3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM postgres:12
LABEL maintainer="Mike Dillon <[email protected]>"

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.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 \
&& 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

4 changes: 3 additions & 1 deletion 9.5-2.5/README.md → 12-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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:

Expand Down
61 changes: 61 additions & 0 deletions 12-3/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM postgres:12-alpine
LABEL maintainer="Régis Belson <[email protected]>"

ENV POSTGIS_VERSION 3.0.0
ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123

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 \
file \
json-c-dev \
libtool \
libxml2-dev \
make \
perl \
clang-dev \
g++ \
gcc \
gdal-dev \
geos-dev \
llvm9-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 \
geos \
gdal \
proj \
libstdc++ \
protobuf-c \
&& cd / \
&& rm -rf /usr/src/postgis \
&& apk del .fetch-deps .build-deps

COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
COPY ./update-postgis.sh /usr/local/bin
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions 9.4-2.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
FROM postgres:9.4
MAINTAINER Mike Dillon <[email protected]>
LABEL maintainer="Mike Dillon <[email protected]>"

ENV POSTGIS_MAJOR 2.5
ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1
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_VERSION \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /docker-entrypoint-initdb.d
Expand Down
4 changes: 3 additions & 1 deletion 9.4-2.5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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:

Expand Down
26 changes: 12 additions & 14 deletions 9.4-2.5/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM postgres:9.4-alpine
MAINTAINER Régis Belson <[email protected]>
LABEL maintainer="Régis Belson <[email protected]>"

ENV POSTGIS_VERSION 2.5.2
ENV POSTGIS_SHA256 225aeaece00a1a6a9af15526af81bef2af27f4c198de820af1367a792ee1d1a9
ENV POSTGIS_VERSION 2.5.3
ENV POSTGIS_SHA256 402323c83d97f3859bc9083345dd687f933c261efe0830e1262c20c12671f794

RUN set -ex \
\
Expand All @@ -24,19 +24,19 @@ RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
g++ \
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 \
proj4-dev \
llvm9-dev \
proj-dev \
protobuf-c-dev \
&& cd /usr/src/postgis \
&& ./autogen.sh \
Expand All @@ -48,16 +48,14 @@ 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 \
proj4 \
proj \
libstdc++ \
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
Loading