From 40ca9b0a74ab0c8ef9ab27126b635f931d16be60 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 9 Feb 2020 16:59:02 +0100 Subject: Dockerfile: fix build with tiff&curl dependencies, and use CDN TIFF files --- Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 7eeb5ba7..158fc59d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,13 +13,14 @@ RUN apt-get update -y \ && apt-get install -y --fix-missing --no-install-recommends \ software-properties-common build-essential ca-certificates \ git make cmake wget unzip libtool automake \ - zlib1g-dev libsqlite3-dev pkg-config sqlite3 + zlib1g-dev libsqlite3-dev pkg-config sqlite3 libcurl4-gnutls-dev \ + libtiff5-dev -RUN git clone https://github.com/OSGeo/PROJ.git \ +RUN git clone --depth 1 --single-branch https://github.com/OSGeo/PROJ.git \ && cd PROJ \ && ./autogen.sh \ && ./configure --prefix=/usr \ - && make \ + && make -j$(nproc) \ && make install @@ -31,18 +32,17 @@ RUN date RUN apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ - libsqlite3-0 \ - curl unzip + libsqlite3-0 libtiff5 libcurl4 libcurl3-gnutls \ + wget ca-certificates # Put this first as this is rarely changing RUN \ mkdir -p /usr/share/proj; \ - curl -LOs https://download.osgeo.org/proj/proj-datumgrid-1.8.zip && unzip -j -u -o proj-datumgrid-1.8.zip -d /usr/share/proj; \ - curl -LOs https://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 https://download.osgeo.org/proj/proj-datumgrid-oceania-1.0.zip && unzip -j -u -o proj-datumgrid-oceania-1.0.zip -d /usr/share/proj; \ - curl -LOs https://download.osgeo.org/proj/proj-datumgrid-world-1.0.zip && unzip -j -u -o proj-datumgrid-world-1.0.zip -d /usr/share/proj; \ - curl -LOs https://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 + wget --no-verbose --mirror https://cdn.proj.org/; \ + rm -f cdn.proj.org/*.js; \ + rm -f cdn.proj.org/*.css; \ + mv cdn.proj.org/* /usr/share/proj/; \ + rmdir cdn.proj.org COPY --from=builder /build/usr/share/proj/ /usr/share/proj/ COPY --from=builder /build/usr/include/ /usr/include/ -- cgit v1.2.3