Skip to content

Commit 09b3f86

Browse files
authored
update dockerfiles (-3.1;-master) (#270)
* update dockerfiles (-3.1;-master) * *-master: fix gdal dir, improve logging * update -master - postgis repo to github based; it is more stable
1 parent 0f60c17 commit 09b3f86

File tree

9 files changed

+72
-30
lines changed

9 files changed

+72
-30
lines changed

10-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:10-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

11-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:11-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

12-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:12-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

13-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:13-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

13-master/Dockerfile

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN set -ex \
6161
# sfcgal
6262
ENV SFCGAL_VERSION master
6363
#current:
64-
#ENV SFCGAL_GIT_HASH 815d5097f684dbc48b22041bf2047beab36df0a1
64+
#ENV SFCGAL_GIT_HASH b1646552e77acccce74b26686a2e048a74caacb7
6565
#reverted for the last working version
6666
ENV SFCGAL_GIT_HASH e1f5cd801f8796ddb442c06c11ce8c30a7eed2c5
6767

@@ -81,7 +81,7 @@ RUN set -ex \
8181

8282
# proj
8383
ENV PROJ_VERSION master
84-
ENV PROJ_GIT_HASH ef5c77acb2a6286f856b9ad6940f78013f6b3c54
84+
ENV PROJ_GIT_HASH ac882266b57d04720bb645b8144901127f7427cf
8585

8686
RUN set -ex \
8787
&& cd /usr/src \
@@ -97,7 +97,7 @@ RUN set -ex \
9797

9898
# geos
9999
ENV GEOS_VERSION master
100-
ENV GEOS_GIT_HASH 79f75266db60f5c69f5ae48ebc8680b2b26c9f01
100+
ENV GEOS_GIT_HASH 83d16f913eac72cccbe07c18033d6c1056bfbcee
101101

102102
RUN set -ex \
103103
&& cd /usr/src \
@@ -114,14 +114,22 @@ RUN set -ex \
114114

115115
# gdal
116116
ENV GDAL_VERSION master
117-
ENV GDAL_GIT_HASH e9fd8ce797a07df68a12298b9fd3db9ff959932d
117+
ENV GDAL_GIT_HASH ab147114c2f1387447c3efc1a7ac7dfc3d7bad9a
118118

119119
RUN set -ex \
120120
&& cd /usr/src \
121121
&& git clone https://github.com/OSGeo/gdal.git \
122122
&& cd gdal \
123123
&& git checkout ${GDAL_GIT_HASH} \
124-
&& cd gdal \
124+
\
125+
# gdal project directory structure - has been changed !
126+
&& if [ -d "gdal" ] ; then \
127+
echo "Directory 'gdal' dir exists -> older version!" ; \
128+
cd gdal ; \
129+
else \
130+
echo "Directory 'gdal' does not exists! Newer version! " ; \
131+
fi \
132+
\
125133
&& ./autogen.sh \
126134
&& ./configure --disable-static \
127135
&& make -j$(nproc) \
@@ -171,10 +179,10 @@ RUN set -ex \
171179

172180
COPY --from=builder /usr/local /usr/local
173181

174-
#ENV SFCGAL_GIT_HASH 815d5097f684dbc48b22041bf2047beab36df0a1
175-
ENV PROJ_GIT_HASH ef5c77acb2a6286f856b9ad6940f78013f6b3c54
176-
ENV GEOS_GIT_HASH 79f75266db60f5c69f5ae48ebc8680b2b26c9f01
177-
ENV GDAL_GIT_HASH e9fd8ce797a07df68a12298b9fd3db9ff959932d
182+
#ENV SFCGAL_GIT_HASH b1646552e77acccce74b26686a2e048a74caacb7
183+
ENV PROJ_GIT_HASH ac882266b57d04720bb645b8144901127f7427cf
184+
ENV GEOS_GIT_HASH 83d16f913eac72cccbe07c18033d6c1056bfbcee
185+
ENV GDAL_GIT_HASH ab147114c2f1387447c3efc1a7ac7dfc3d7bad9a
178186

179187
# Minimal command line test.
180188
RUN set -ex \
@@ -188,7 +196,7 @@ RUN set -ex \
188196

189197
# install postgis
190198
ENV POSTGIS_VERSION master
191-
ENV POSTGIS_GIT_HASH 21c3f2351e2f8ab0ca3a95ad6fbba04378f4aece
199+
ENV POSTGIS_GIT_HASH 530f7c88cbebf8357650ad7f337a46f61c0dd214
192200

193201
RUN set -ex \
194202
&& apt-get update \
@@ -222,7 +230,7 @@ RUN set -ex \
222230
&& cd \
223231
# postgis
224232
&& cd /usr/src/ \
225-
&& git clone https://git.osgeo.org/gitea/postgis/postgis.git \
233+
&& git clone https://github.com/postgis/postgis.git \
226234
&& cd postgis \
227235
&& git checkout ${POSTGIS_GIT_HASH} \
228236
&& ./autogen.sh \
@@ -241,6 +249,11 @@ RUN set -ex \
241249
&& ldconfig \
242250
&& cd regress \
243251
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
252+
\
253+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
254+
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
255+
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
256+
\
244257
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
245258
&& rm -rf /tempdb \
246259
&& rm -rf /tmp/pgis_reg \
@@ -280,4 +293,5 @@ RUN set -ex \
280293
RUN mkdir -p /docker-entrypoint-initdb.d
281294
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
282295
COPY ./update-postgis.sh /usr/local/bin
296+
RUN cat /_pgis_full_version.txt
283297

14-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:14-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

14-master/Dockerfile

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN set -ex \
6161
# sfcgal
6262
ENV SFCGAL_VERSION master
6363
#current:
64-
#ENV SFCGAL_GIT_HASH 815d5097f684dbc48b22041bf2047beab36df0a1
64+
#ENV SFCGAL_GIT_HASH b1646552e77acccce74b26686a2e048a74caacb7
6565
#reverted for the last working version
6666
ENV SFCGAL_GIT_HASH e1f5cd801f8796ddb442c06c11ce8c30a7eed2c5
6767

@@ -81,7 +81,7 @@ RUN set -ex \
8181

8282
# proj
8383
ENV PROJ_VERSION master
84-
ENV PROJ_GIT_HASH ef5c77acb2a6286f856b9ad6940f78013f6b3c54
84+
ENV PROJ_GIT_HASH ac882266b57d04720bb645b8144901127f7427cf
8585

8686
RUN set -ex \
8787
&& cd /usr/src \
@@ -97,7 +97,7 @@ RUN set -ex \
9797

9898
# geos
9999
ENV GEOS_VERSION master
100-
ENV GEOS_GIT_HASH 79f75266db60f5c69f5ae48ebc8680b2b26c9f01
100+
ENV GEOS_GIT_HASH 83d16f913eac72cccbe07c18033d6c1056bfbcee
101101

102102
RUN set -ex \
103103
&& cd /usr/src \
@@ -114,14 +114,22 @@ RUN set -ex \
114114

115115
# gdal
116116
ENV GDAL_VERSION master
117-
ENV GDAL_GIT_HASH e9fd8ce797a07df68a12298b9fd3db9ff959932d
117+
ENV GDAL_GIT_HASH ab147114c2f1387447c3efc1a7ac7dfc3d7bad9a
118118

119119
RUN set -ex \
120120
&& cd /usr/src \
121121
&& git clone https://github.com/OSGeo/gdal.git \
122122
&& cd gdal \
123123
&& git checkout ${GDAL_GIT_HASH} \
124-
&& cd gdal \
124+
\
125+
# gdal project directory structure - has been changed !
126+
&& if [ -d "gdal" ] ; then \
127+
echo "Directory 'gdal' dir exists -> older version!" ; \
128+
cd gdal ; \
129+
else \
130+
echo "Directory 'gdal' does not exists! Newer version! " ; \
131+
fi \
132+
\
125133
&& ./autogen.sh \
126134
&& ./configure --disable-static \
127135
&& make -j$(nproc) \
@@ -171,10 +179,10 @@ RUN set -ex \
171179

172180
COPY --from=builder /usr/local /usr/local
173181

174-
#ENV SFCGAL_GIT_HASH 815d5097f684dbc48b22041bf2047beab36df0a1
175-
ENV PROJ_GIT_HASH ef5c77acb2a6286f856b9ad6940f78013f6b3c54
176-
ENV GEOS_GIT_HASH 79f75266db60f5c69f5ae48ebc8680b2b26c9f01
177-
ENV GDAL_GIT_HASH e9fd8ce797a07df68a12298b9fd3db9ff959932d
182+
#ENV SFCGAL_GIT_HASH b1646552e77acccce74b26686a2e048a74caacb7
183+
ENV PROJ_GIT_HASH ac882266b57d04720bb645b8144901127f7427cf
184+
ENV GEOS_GIT_HASH 83d16f913eac72cccbe07c18033d6c1056bfbcee
185+
ENV GDAL_GIT_HASH ab147114c2f1387447c3efc1a7ac7dfc3d7bad9a
178186

179187
# Minimal command line test.
180188
RUN set -ex \
@@ -188,7 +196,7 @@ RUN set -ex \
188196

189197
# install postgis
190198
ENV POSTGIS_VERSION master
191-
ENV POSTGIS_GIT_HASH 21c3f2351e2f8ab0ca3a95ad6fbba04378f4aece
199+
ENV POSTGIS_GIT_HASH 530f7c88cbebf8357650ad7f337a46f61c0dd214
192200

193201
RUN set -ex \
194202
&& apt-get update \
@@ -222,7 +230,7 @@ RUN set -ex \
222230
&& cd \
223231
# postgis
224232
&& cd /usr/src/ \
225-
&& git clone https://git.osgeo.org/gitea/postgis/postgis.git \
233+
&& git clone https://github.com/postgis/postgis.git \
226234
&& cd postgis \
227235
&& git checkout ${POSTGIS_GIT_HASH} \
228236
&& ./autogen.sh \
@@ -241,6 +249,11 @@ RUN set -ex \
241249
&& ldconfig \
242250
&& cd regress \
243251
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
252+
\
253+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
254+
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
255+
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
256+
\
244257
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
245258
&& rm -rf /tempdb \
246259
&& rm -rf /tmp/pgis_reg \
@@ -280,4 +293,5 @@ RUN set -ex \
280293
RUN mkdir -p /docker-entrypoint-initdb.d
281294
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
282295
COPY ./update-postgis.sh /usr/local/bin
296+
RUN cat /_pgis_full_version.txt
283297

9.6-3.1/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM postgres:9.6-bullseye
33
LABEL maintainer="PostGIS Project - https://postgis.net"
44

55
ENV POSTGIS_MAJOR 3
6-
ENV POSTGIS_VERSION 3.1.4+dfsg-1.pgdg110+1
6+
ENV POSTGIS_VERSION 3.1.4+dfsg-3.pgdg110+1
77

88
RUN apt-get update \
99
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \

Dockerfile.master.template

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,15 @@ RUN set -ex \
121121
&& git clone https://github.com/OSGeo/gdal.git \
122122
&& cd gdal \
123123
&& git checkout ${GDAL_GIT_HASH} \
124-
&& cd gdal \
124+
\
125+
# gdal project directory structure - has been changed !
126+
&& if [ -d "gdal" ] ; then \
127+
echo "Directory 'gdal' dir exists -> older version!" ; \
128+
cd gdal ; \
129+
else \
130+
echo "Directory 'gdal' does not exists! Newer version! " ; \
131+
fi \
132+
\
125133
&& ./autogen.sh \
126134
&& ./configure --disable-static \
127135
&& make -j$(nproc) \
@@ -222,7 +230,7 @@ RUN set -ex \
222230
&& cd \
223231
# postgis
224232
&& cd /usr/src/ \
225-
&& git clone https://git.osgeo.org/gitea/postgis/postgis.git \
233+
&& git clone https://github.com/postgis/postgis.git \
226234
&& cd postgis \
227235
&& git checkout ${POSTGIS_GIT_HASH} \
228236
&& ./autogen.sh \
@@ -241,6 +249,11 @@ RUN set -ex \
241249
&& ldconfig \
242250
&& cd regress \
243251
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
252+
\
253+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
254+
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
255+
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
256+
\
244257
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
245258
&& rm -rf /tempdb \
246259
&& rm -rf /tmp/pgis_reg \
@@ -280,4 +293,5 @@ RUN set -ex \
280293
RUN mkdir -p /docker-entrypoint-initdb.d
281294
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
282295
COPY ./update-postgis.sh /usr/local/bin
296+
RUN cat /_pgis_full_version.txt
283297

0 commit comments

Comments
 (0)