aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorAndrew Bell <andrew.bell.ia@gmail.com>2019-05-15 10:47:03 -0400
committerAndrew Bell <andrew.bell.ia@gmail.com>2019-05-15 10:47:03 -0400
commit8f268409d37cea329d263e177b83e42f8384d3c7 (patch)
treec4d0f3dd19456600f718a6e0c8573577f433549b /Dockerfile
parent886ced02f0aaab5d66d16459435f7447cf976650 (diff)
parentd67203a6f76a74f5ac029ff052dbcc72e3b59624 (diff)
downloadPROJ-8f268409d37cea329d263e177b83e42f8384d3c7.tar.gz
PROJ-8f268409d37cea329d263e177b83e42f8384d3c7.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile53
1 files changed, 32 insertions, 21 deletions
diff --git a/Dockerfile b/Dockerfile
index aef1ae09..c3452aa2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,40 +1,51 @@
##
# osgeo/proj.4
-FROM ubuntu:18.04
+FROM ubuntu:18.04 as builder
MAINTAINER Howard Butler <howard@hobu.co>
+ARG PROJ_VERSION=master
+ARG DESTDIR="/build"
# Setup build env
-RUN mkdir /build
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 \
- && apt-get remove --purge -y $BUILD_PACKAGES && rm -rf /var/lib/apt/lists/*
-
-
-RUN mkdir /vdatum \
- && cd /vdatum \
- && wget http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/usa_geoid2009.zip && unzip -j -u usa_geoid2009.zip -d /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/usa_geoid2003.zip && unzip -j -u usa_geoid2003.zip -d /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/usa_geoid1999.zip && unzip -j -u usa_geoid1999.zip -d /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/vertcon/vertconc.gtx && mv vertconc.gtx /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/vertcon/vertcone.gtx && mv vertcone.gtx /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/vertcon/vertconw.gtx && mv vertconw.gtx /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/egm96_15/egm96_15.gtx && mv egm96_15.gtx /usr/share/proj \
- && wget http://download.osgeo.org/proj/vdatum/egm08_25/egm08_25.gtx && mv egm08_25.gtx /usr/share/proj \
- && rm -rf /vdatum
-
+ zlib1g-dev libsqlite3-dev pkg-config sqlite3
RUN git clone https://github.com/OSGeo/proj.4.git \
&& cd proj.4 \
&& ./autogen.sh \
&& ./configure --prefix=/usr \
&& make \
- && make install \
- && rm -rf /proj.4
+ && make install
+
+
+
+
+FROM ubuntu:18.04 as runner
+
+RUN date
+
+RUN apt-get update; \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y \
+ libsqlite3-0 \
+ curl unzip
+
+# 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; \
+ curl -LOs http://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 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/