Skip to content

Makefile and Dockerfile template updates #166

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

Merged
merged 7 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ services: docker
dist: xenial

env:
- VERSION=9.4-2.5
- VERSION=9.4-2.5 VARIANT=alpine
- VERSION=9.5-2.5
- VERSION=9.5-2.5 VARIANT=alpine
- VERSION=9.6-2.5
- VERSION=9.6-2.5 VARIANT=alpine
- VERSION=10-2.5
- VERSION=10-2.5 VARIANT=alpine
- VERSION=11-2.5
- VERSION=11-2.5 VARIANT=alpine
- VERSION=12-2.5
- VERSION=12-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=9.6-2.5
- VERSION=9.6-2.5 VARIANT=alpine
- VERSION=9.5-3.0
- VERSION=9.5-3.0 VARIANT=alpine
- VERSION=9.5-2.5
- VERSION=9.5-2.5 VARIANT=alpine

install:
- git clone https://github.com/docker-library/official-images.git ~/official-images

before_script:
- env | grep -E "VARIANT|VERSION" | sort
- cd "$VERSION/$VARIANT"
- image="appropriate/postgis:$VERSION${VARIANT:+-${VARIANT}}"
- image="postgis/postgis:$VERSION${VARIANT:+-${VARIANT}}"

script:
- docker build --pull -t "$image" .
Expand Down
4 changes: 2 additions & 2 deletions 10-2.5/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
4 changes: 2 additions & 2 deletions 11-2.5/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
4 changes: 2 additions & 2 deletions 12-2.5/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
4 changes: 2 additions & 2 deletions 9.5-2.5/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
6 changes: 3 additions & 3 deletions 9.4-2.5/Dockerfile → 9.5-3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM postgres:9.4
FROM postgres:9.5

LABEL maintainer="PostGIS Project - https://postgis.net"

ENV POSTGIS_MAJOR 2.5
ENV POSTGIS_VERSION 2.5.3+dfsg-3.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 \
Expand Down
4 changes: 2 additions & 2 deletions 9.4-2.5/README.md → 9.5-3.0/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
6 changes: 3 additions & 3 deletions 9.4-2.5/alpine/Dockerfile → 9.5-3.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM postgres:9.4-alpine
FROM postgres:9.5-alpine

LABEL maintainer="PostGIS Project - https://postgis.net"

ENV POSTGIS_VERSION 2.5.3
ENV POSTGIS_SHA256 402323c83d97f3859bc9083345dd687f933c261efe0830e1262c20c12671f794
ENV POSTGIS_VERSION 3.0.0
ENV POSTGIS_SHA256 1c83fb2fc8870d36ed49859c49a12c8c4c8ae8c5c3f912a21a951c5bcc249123

RUN set -ex \
\
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions 9.6-2.5/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
23 changes: 11 additions & 12 deletions Dockerfile.alpine.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM postgres:%%PG_MAJOR%%-alpine
MAINTAINER Régis Belson <[email protected]>

LABEL maintainer="PostGIS Project - https://postgis.net"

ENV POSTGIS_VERSION %%POSTGIS_VERSION%%
ENV POSTGIS_SHA256 %%POSTGIS_SHA256%%
Expand All @@ -24,19 +25,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 +49,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
4 changes: 2 additions & 2 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM postgres:%%PG_MAJOR%%
MAINTAINER Mike Dillon <[email protected]>

LABEL maintainer="PostGIS Project - https://postgis.net"

ENV POSTGIS_MAJOR %%POSTGIS_MAJOR%%
ENV POSTGIS_VERSION %%POSTGIS_VERSION%%
Expand All @@ -9,7 +10,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
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
VERSIONS = $(foreach df,$(wildcard */Dockerfile),$(df:%/Dockerfile=%))
REPO_NAME ?= postgis
IMAGE_NAME ?= postgis

all: build

build: $(VERSIONS)

define postgis-version
$1:
docker build -t mdillon/postgis:$(shell echo $1 | sed -e 's/-.*//g') $1
docker build -t mdillon/postgis:$(shell echo $1 | sed -e 's/-.*//g')-alpine $1/alpine
docker build -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1) $1
docker build -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1)-alpine $1/alpine
endef
$(foreach version,$(VERSIONS),$(eval $(call postgis-version,$(version))))

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# postgis/postgis

[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/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)
[![Build Status](https://travis-ci.org/postgis/docker-postgis.svg)](https://travis-ci.org/postgis/docker-postgis) [![Join the chat at https://gitter.im/postgis/docker-postgis](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.4-9.6), Postgres 10, Postgres 11, and Postgres 12.
The `postgis/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 debian and alpine variants for each version of Postgres 9 supported by the base image (9.5-9.6), Postgres 10, Postgres 11, and Postgres 12.

This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:

Expand Down
4 changes: 2 additions & 2 deletions test/postgis-config.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
testAlias[appropriate/postgis]=postgres
testAlias[postgis/postgis]=postgres

imageTests[appropriate/postgis]='
imageTests[postgis/postgis]='
postgis-basics
'
Loading