aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-26 17:22:44 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-26 17:22:44 +0200
commit13f991a7322492d76f8d5b3f80a5655729ef7879 (patch)
treee38132a05a834ac87d678e68ab5a6f04b09a2696 /Dockerfile
parent1cf2bf5ca15a9b8a7b8ef53bd8e455d82e481ce9 (diff)
downloadPROJ-13f991a7322492d76f8d5b3f80a5655729ef7879.tar.gz
PROJ-13f991a7322492d76f8d5b3f80a5655729ef7879.zip
Dockerfile: revise layer order for better caching
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index a8519cfc..c3452aa2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,12 +34,9 @@ RUN apt-get update; \
libsqlite3-0 \
curl unzip
-COPY --from=builder /build/usr/bin/ /usr/bin/
-COPY --from=builder /build/usr/lib/ /usr/lib/
-COPY --from=builder /build/usr/include/ /usr/include/
-COPY --from=builder /build/usr/share/proj/ /usr/share/proj/
-
+# Put this first as this is rarely changing
RUN \
+ mkdir -p /usr/share/proj; \
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-1.8.zip && unzip -j -u -o proj-datumgrid-1.8.zip -d /usr/share/proj; \
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-europe-1.2.zip && unzip -j -u -o proj-datumgrid-europe-1.2.zip -d /usr/share/proj; \
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-oceania-1.0.zip && unzip -j -u -o proj-datumgrid-oceania-1.0.zip -d /usr/share/proj; \
@@ -47,3 +44,8 @@ RUN \
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-north-america-1.2.zip && unzip -j -u -o proj-datumgrid-north-america-1.2.zip -d /usr/share/proj; \
rm *.zip
+COPY --from=builder /build/usr/share/proj/ /usr/share/proj/
+COPY --from=builder /build/usr/include/ /usr/include/
+COPY --from=builder /build/usr/bin/ /usr/bin/
+COPY --from=builder /build/usr/lib/ /usr/lib/
+