File tree Expand file tree Collapse file tree 14 files changed +498
-8
lines changed Expand file tree Collapse file tree 14 files changed +498
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
language : bash
3
+ services : docker
3
4
4
5
dist : trusty
5
6
6
7
env :
7
- - VERSION=9.2-2.3
8
- - VERSION=9.3-2.3
9
- - VERSION=9.4-2.3
10
- - VERSION=9.5-2.3
11
8
- VERSION=9.6-2.3
9
+ - VERSION=9.6-2.3 VARIANT=alpine
10
+ - VERSION=9.5-2.3
11
+ - VERSION=9.5-2.3 VARIANT=alpine
12
+ - VERSION=9.4-2.3
13
+ - VERSION=9.4-2.3 VARIANT=alpine
14
+ - VERSION=9.3-2.3
15
+ - VERSION=9.3-2.3 VARIANT=alpine
16
+ - VERSION=9.2-2.3
17
+ - VERSION=9.2-2.3 VARIANT=alpine
12
18
13
19
install :
14
20
- git clone https://github.com/docker-library/official-images.git ~/official-images
15
21
16
22
before_script :
17
23
- env | sort
18
- - cd "$VERSION"
19
- - image="appropriate/postgis:$VERSION"
24
+ - cd "$VERSION/$VARIANT "
25
+ - image="appropriate/postgis:$VERSION${VARIANT:+-${VARIANT}} "
20
26
21
27
script :
22
28
- docker build --pull -t "$image" .
23
- - ~/official-images/test/run.sh -c ~/official-images/test/config.sh -c ../test/postgis-config.sh "$image"
29
+ - ~/official-images/test/run.sh -c ~/official-images/test/config.sh -c " ../${VARIANT:+../} test/postgis-config.sh" "$image"
Original file line number Diff line number Diff line change
1
+ FROM postgres:9.2-alpine
2
+ MAINTAINER Régis Belson <
[email protected] >
3
+
4
+ ENV POSTGIS_VERSION 2.3.1
5
+ ENV POSTGIS_SHA256 0f1e0fe08f55b6db791d8600bb343e4f77590725acbbec99094a30b8b7439cd8
6
+
7
+ RUN set -ex \
8
+ \
9
+ && apk add --no-cache --virtual .fetch-deps \
10
+ ca-certificates \
11
+ openssl \
12
+ tar \
13
+ \
14
+ && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz" \
15
+ && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c - \
16
+ && mkdir -p /usr/src/postgis \
17
+ && tar \
18
+ --extract \
19
+ --file postgis.tar.gz \
20
+ --directory /usr/src/postgis \
21
+ --strip-components 1 \
22
+ && rm postgis.tar.gz \
23
+ \
24
+ && apk add --no-cache --virtual .build-deps \
25
+ autoconf \
26
+ automake \
27
+ g++ \
28
+ json-c-dev \
29
+ libtool \
30
+ libxml2-dev \
31
+ make \
32
+ perl \
33
+ \
34
+ && apk add --no-cache --virtual .build-deps-testing \
35
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
36
+ gdal-dev \
37
+ geos-dev \
38
+ proj4-dev \
39
+ && cd /usr/src/postgis \
40
+ && ./autogen.sh \
41
+ # configure options taken from:
42
+ # https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
43
+ && ./configure \
44
+ # --with-gui \
45
+ && make \
46
+ && make install \
47
+ && apk add --no-cache --virtual .postgis-rundeps \
48
+ json-c \
49
+ && apk add --no-cache --virtual .postgis-rundeps-testing \
50
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
51
+ geos \
52
+ gdal \
53
+ proj4 \
54
+ && cd / \
55
+ && rm -rf /usr/src/postgis \
56
+ && apk del .fetch-deps .build-deps .build-deps-testing
57
+
58
+ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ # Perform all actions as $POSTGRES_USER
6
+ export PGUSER=" $POSTGRES_USER "
7
+
8
+ # Create the 'template_postgis' template db
9
+ " ${psql[@]} " << - 'EOSQL '
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
12
+ EOSQL
13
+
14
+ # Load PostGIS into both template_database and $POSTGRES_DB
15
+ for DB in template_postgis " $POSTGRES_DB " ; do
16
+ echo " Loading PostGIS extensions into $DB "
17
+ " ${psql[@]} " --dbname=" $DB " << -'EOSQL '
18
+ CREATE EXTENSION IF NOT EXISTS postgis;
19
+ CREATE EXTENSION IF NOT EXISTS postgis_topology;
20
+ CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
21
+ CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
22
+ EOSQL
23
+ done
Original file line number Diff line number Diff line change
1
+ FROM postgres:9.3-alpine
2
+ MAINTAINER Régis Belson <
[email protected] >
3
+
4
+ ENV POSTGIS_VERSION 2.3.1
5
+ ENV POSTGIS_SHA256 0f1e0fe08f55b6db791d8600bb343e4f77590725acbbec99094a30b8b7439cd8
6
+
7
+ RUN set -ex \
8
+ \
9
+ && apk add --no-cache --virtual .fetch-deps \
10
+ ca-certificates \
11
+ openssl \
12
+ tar \
13
+ \
14
+ && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz" \
15
+ && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c - \
16
+ && mkdir -p /usr/src/postgis \
17
+ && tar \
18
+ --extract \
19
+ --file postgis.tar.gz \
20
+ --directory /usr/src/postgis \
21
+ --strip-components 1 \
22
+ && rm postgis.tar.gz \
23
+ \
24
+ && apk add --no-cache --virtual .build-deps \
25
+ autoconf \
26
+ automake \
27
+ g++ \
28
+ json-c-dev \
29
+ libtool \
30
+ libxml2-dev \
31
+ make \
32
+ perl \
33
+ \
34
+ && apk add --no-cache --virtual .build-deps-testing \
35
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
36
+ gdal-dev \
37
+ geos-dev \
38
+ proj4-dev \
39
+ && cd /usr/src/postgis \
40
+ && ./autogen.sh \
41
+ # configure options taken from:
42
+ # https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
43
+ && ./configure \
44
+ # --with-gui \
45
+ && make \
46
+ && make install \
47
+ && apk add --no-cache --virtual .postgis-rundeps \
48
+ json-c \
49
+ && apk add --no-cache --virtual .postgis-rundeps-testing \
50
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
51
+ geos \
52
+ gdal \
53
+ proj4 \
54
+ && cd / \
55
+ && rm -rf /usr/src/postgis \
56
+ && apk del .fetch-deps .build-deps .build-deps-testing
57
+
58
+ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ # Perform all actions as $POSTGRES_USER
6
+ export PGUSER=" $POSTGRES_USER "
7
+
8
+ # Create the 'template_postgis' template db
9
+ " ${psql[@]} " << - 'EOSQL '
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
12
+ EOSQL
13
+
14
+ # Load PostGIS into both template_database and $POSTGRES_DB
15
+ for DB in template_postgis " $POSTGRES_DB " ; do
16
+ echo " Loading PostGIS extensions into $DB "
17
+ " ${psql[@]} " --dbname=" $DB " << -'EOSQL '
18
+ CREATE EXTENSION IF NOT EXISTS postgis;
19
+ CREATE EXTENSION IF NOT EXISTS postgis_topology;
20
+ CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
21
+ CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
22
+ EOSQL
23
+ done
Original file line number Diff line number Diff line change
1
+ FROM postgres:9.4-alpine
2
+ MAINTAINER Régis Belson <
[email protected] >
3
+
4
+ ENV POSTGIS_VERSION 2.3.1
5
+ ENV POSTGIS_SHA256 0f1e0fe08f55b6db791d8600bb343e4f77590725acbbec99094a30b8b7439cd8
6
+
7
+ RUN set -ex \
8
+ \
9
+ && apk add --no-cache --virtual .fetch-deps \
10
+ ca-certificates \
11
+ openssl \
12
+ tar \
13
+ \
14
+ && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz" \
15
+ && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c - \
16
+ && mkdir -p /usr/src/postgis \
17
+ && tar \
18
+ --extract \
19
+ --file postgis.tar.gz \
20
+ --directory /usr/src/postgis \
21
+ --strip-components 1 \
22
+ && rm postgis.tar.gz \
23
+ \
24
+ && apk add --no-cache --virtual .build-deps \
25
+ autoconf \
26
+ automake \
27
+ g++ \
28
+ json-c-dev \
29
+ libtool \
30
+ libxml2-dev \
31
+ make \
32
+ perl \
33
+ \
34
+ && apk add --no-cache --virtual .build-deps-testing \
35
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
36
+ gdal-dev \
37
+ geos-dev \
38
+ proj4-dev \
39
+ && cd /usr/src/postgis \
40
+ && ./autogen.sh \
41
+ # configure options taken from:
42
+ # https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
43
+ && ./configure \
44
+ # --with-gui \
45
+ && make \
46
+ && make install \
47
+ && apk add --no-cache --virtual .postgis-rundeps \
48
+ json-c \
49
+ && apk add --no-cache --virtual .postgis-rundeps-testing \
50
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
51
+ geos \
52
+ gdal \
53
+ proj4 \
54
+ && cd / \
55
+ && rm -rf /usr/src/postgis \
56
+ && apk del .fetch-deps .build-deps .build-deps-testing
57
+
58
+ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ # Perform all actions as $POSTGRES_USER
6
+ export PGUSER=" $POSTGRES_USER "
7
+
8
+ # Create the 'template_postgis' template db
9
+ " ${psql[@]} " << - 'EOSQL '
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
12
+ EOSQL
13
+
14
+ # Load PostGIS into both template_database and $POSTGRES_DB
15
+ for DB in template_postgis " $POSTGRES_DB " ; do
16
+ echo " Loading PostGIS extensions into $DB "
17
+ " ${psql[@]} " --dbname=" $DB " << -'EOSQL '
18
+ CREATE EXTENSION IF NOT EXISTS postgis;
19
+ CREATE EXTENSION IF NOT EXISTS postgis_topology;
20
+ CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
21
+ CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
22
+ EOSQL
23
+ done
Original file line number Diff line number Diff line change
1
+ FROM postgres:9.5-alpine
2
+ MAINTAINER Régis Belson <
[email protected] >
3
+
4
+ ENV POSTGIS_VERSION 2.3.1
5
+ ENV POSTGIS_SHA256 0f1e0fe08f55b6db791d8600bb343e4f77590725acbbec99094a30b8b7439cd8
6
+
7
+ RUN set -ex \
8
+ \
9
+ && apk add --no-cache --virtual .fetch-deps \
10
+ ca-certificates \
11
+ openssl \
12
+ tar \
13
+ \
14
+ && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz" \
15
+ && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c - \
16
+ && mkdir -p /usr/src/postgis \
17
+ && tar \
18
+ --extract \
19
+ --file postgis.tar.gz \
20
+ --directory /usr/src/postgis \
21
+ --strip-components 1 \
22
+ && rm postgis.tar.gz \
23
+ \
24
+ && apk add --no-cache --virtual .build-deps \
25
+ autoconf \
26
+ automake \
27
+ g++ \
28
+ json-c-dev \
29
+ libtool \
30
+ libxml2-dev \
31
+ make \
32
+ perl \
33
+ \
34
+ && apk add --no-cache --virtual .build-deps-testing \
35
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
36
+ gdal-dev \
37
+ geos-dev \
38
+ proj4-dev \
39
+ && cd /usr/src/postgis \
40
+ && ./autogen.sh \
41
+ # configure options taken from:
42
+ # https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
43
+ && ./configure \
44
+ # --with-gui \
45
+ && make \
46
+ && make install \
47
+ && apk add --no-cache --virtual .postgis-rundeps \
48
+ json-c \
49
+ && apk add --no-cache --virtual .postgis-rundeps-testing \
50
+ --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
51
+ geos \
52
+ gdal \
53
+ proj4 \
54
+ && cd / \
55
+ && rm -rf /usr/src/postgis \
56
+ && apk del .fetch-deps .build-deps .build-deps-testing
57
+
58
+ COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ # Perform all actions as $POSTGRES_USER
6
+ export PGUSER=" $POSTGRES_USER "
7
+
8
+ # Create the 'template_postgis' template db
9
+ " ${psql[@]} " << - 'EOSQL '
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
12
+ EOSQL
13
+
14
+ # Load PostGIS into both template_database and $POSTGRES_DB
15
+ for DB in template_postgis " $POSTGRES_DB " ; do
16
+ echo " Loading PostGIS extensions into $DB "
17
+ " ${psql[@]} " --dbname=" $DB " << -'EOSQL '
18
+ CREATE EXTENSION IF NOT EXISTS postgis;
19
+ CREATE EXTENSION IF NOT EXISTS postgis_topology;
20
+ CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
21
+ CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
22
+ EOSQL
23
+ done
You can’t perform that action at this time.
0 commit comments