From 13f991a7322492d76f8d5b3f80a5655729ef7879 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 26 Apr 2019 17:22:44 +0200 Subject: Dockerfile: revise layer order for better caching --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Dockerfile') 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/ + -- cgit v1.2.3