File tree 15 files changed +30
-171
lines changed
15 files changed +30
-171
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR 9.0
27
27
ENV PG_VERSION 9.0.22-1.pgdg80+1
28
+ ENV PGIS_MAJOR 2.1
29
+ ENV PGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
File renamed without changes.
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR 9.1
27
27
ENV PG_VERSION 9.1.18-1.pgdg80+1
28
+ ENV PGIS_MAJOR 2.1
29
+ ENV PGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
File renamed without changes.
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR 9.2
27
27
ENV PG_VERSION 9.2.13-1.pgdg80+1
28
+ ENV PGIS_MAJOR 2.1
29
+ ENV PGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
File renamed without changes.
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR 9.3
27
27
ENV PG_VERSION 9.3.9-1.pgdg80+1
28
+ ENV PGIS_MAJOR 2.1
29
+ ENV PGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
File renamed without changes.
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR 9.4
27
27
ENV PG_VERSION 9.4.4-1.pgdg80+1
28
+ ENV PGIS_MAJOR 2.1
29
+ ENV PGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
File renamed without changes.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,14 +25,16 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A4
25
25
26
26
ENV PG_MAJOR %%PG_MAJOR%%
27
27
ENV PG_VERSION %%PG_VERSION%%
28
+ ENV PGIS_MAJOR %%PGIS_MAJOR%%
29
+ ENV PGIS_VERSION %%PGIS_VERSION%%
28
30
29
31
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list
30
32
31
33
RUN apt-get update \
32
34
&& apt-get install -y postgresql-common \
33
35
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
34
36
&& apt-get install -y \
35
- postgresql-$PG_MAJOR=$PG_VERSION \
37
+ postgresql-$PG_MAJOR-postgis-$PGIS_MAJOR=$PGIS_VERSION \
36
38
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
37
39
&& rm -rf /var/lib/apt/lists/*
38
40
Original file line number Diff line number Diff line change 3
3
4
4
declare -A aliases
5
5
aliases=(
6
- [9.4]=' 9 latest'
6
+ [9.4-2.1 ]=' 9-2 9 latest'
7
7
)
8
8
9
9
cd " $( dirname " $( readlink -f " $BASH_SOURCE " ) " ) "
10
10
11
11
versions=( * / )
12
12
versions=( " ${versions[@]%/ } " )
13
- url=' git://github.com/docker-library/postgres'
13
+ url=' git://github.com/docker-library/postgres-postgis '
14
14
15
15
echo ' # maintainer: InfoSiftr <github@infosiftr.com> (@infosiftr)'
16
16
17
17
for version in " ${versions[@]} " ; do
18
18
commit=" $( cd " $version " && git log -1 --format=' format:%H' -- Dockerfile $( awk ' toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile) ) "
19
- fullVersion=" $( grep -m1 ' ENV PG_VERSION ' " $version /Dockerfile" | cut -d' ' -f3 | cut -d- -f1 | sed ' s/~/-/g' ) "
20
- versionAliases=( $fullVersion $version ${aliases[$version]} )
19
+ pgFullVersion=" $( grep -m1 ' ENV PG_VERSION ' " $version /Dockerfile" | cut -d' ' -f3 | cut -d- -f1 | sed ' s/~/-/g' ) "
20
+ pgisFullVersion=" $( grep -m1 ' ENV PGIS_VERSION ' " $version /Dockerfile" | cut -d' ' -f3 | cut -d+ -f1 | sed ' s/~/-/g' ) "
21
+ versionAliases=( $pgFullVersion -$pgisFullVersion $version ${aliases[$version]} )
21
22
22
23
echo
23
24
for va in " ${versionAliases[@]} " ; do
Original file line number Diff line number Diff line change @@ -14,12 +14,17 @@ packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')"
14
14
curl -sSL " ${packagesUrl} .bz2" | bunzip2 > " $packages "
15
15
16
16
for version in " ${versions[@]} " ; do
17
- fullVersion=" $( grep -m1 -A10 " ^Package: postgresql-$version \$ " " $packages " | grep -m1 ' ^Version: ' | cut -d' ' -f2) "
17
+ splitPos=$( expr index " $version " ' -' )
18
+ pgVersion=${version: 0: $(($splitPos - 1))}
19
+ pgFullVersion=" $( grep -m1 -A10 " ^Package: postgresql-$pgVersion \$ " " $packages " | grep -m1 ' ^Version: ' | cut -d' ' -f2) "
20
+ pgisVersion=${version: $splitPos }
21
+ pgisFullVersion=" $( grep -m1 -A10 " ^Package: postgresql-$pgVersion -postgis-$pgisVersion \$ " " $packages " | grep -m1 ' ^Version: ' | cut -d' ' -f2) "
18
22
(
19
23
set -x
20
24
cp docker-entrypoint.sh Dockerfile.template " $version /"
21
25
mv " $version /Dockerfile.template" " $version /Dockerfile"
22
- sed -i ' s/%%PG_MAJOR%%/' $version ' /g; s/%%PG_VERSION%%/' $fullVersion ' /g' " $version /Dockerfile"
26
+ sed -i ' s/%%PG_MAJOR%%/' $pgVersion ' /g; s/%%PG_VERSION%%/' $pgFullVersion ' /g' " $version /Dockerfile"
27
+ sed -i ' s/%%PGIS_MAJOR%%/' $pgisVersion ' /g; s/%%PGIS_VERSION%%/' $pgisFullVersion ' /g' " $version /Dockerfile"
23
28
)
24
29
done
25
30
You can’t perform that action at this time.
0 commit comments