-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
76 lines (70 loc) · 2.45 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM ubuntu:16.04
MAINTAINER Cole Howard <[email protected]>
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
gcc \
g++ \
make \
wget \
curl \
ca-certificates \
apt-transport-https \
zip \
unzip \
locales \
python-dev \
libspatialite-dev \
sqlite3 \
libpq-dev \
libcurl4-gnutls-dev \
libexpat1-dev \
libfreexl-dev \
libproj-dev \
libxml2-dev \
libgeos-dev \
libnetcdf-dev \
libpoppler-dev \
libhdf4-alt-dev \
libhdf5-serial-dev && \
rm -rf /var/lib/apt/lists/* && \
locale-gen en_US.UTF-8 && \
curl --silent --show-error --retry 3 https://bootstrap.pypa.io/get-pip.py | python && \
mkdir -p /data
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN curl --silent --show-error \
https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl --silent --show-error \
https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
unixodbc-dev \
msodbcsql \
mssql-tools && \
rm -rf /var/lib/apt/lists/*
ENV FGDB_SOURCE https://raw.githubusercontent.com/Esri/file-geodatabase-api/master/FileGDB_API_1.5/FileGDB_API_1_5_64gcc51.tar.gz
RUN curl --silent --show-error -o /usr/local/src/filgdb_api.tar.gz ${FGDB_SOURCE} && \
tar -xzvf /usr/local/src/filgdb_api.tar.gz -C /usr/local && \
rm /usr/local/FileGDB_API-64gcc51/lib/libstdc++.so.6 && \
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/FileGDB_API-64gcc51/lib/libstdc++.so.6
ENV LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/usr/local/FileGDB_API-64gcc51/lib"
ENV GDAL_SOURCE https://github.com/OSGeo/gdal/archive/master.zip
RUN wget -O /usr/local/src/gdal-master.zip ${GDAL_SOURCE} && \
unzip /usr/local/src/gdal-master.zip -d /usr/local/src && \
cd /usr/local/src/gdal-master/gdal && \
./configure \
--with-python \
--with-geos \
--with-spatialite \
--with-pg \
--with-freexl \
--with-curl \
--with-libkml \
--with-wfs \
--with-odbc=/opt/microsoft/msodbcsql/lib64 \
--with-fgdb=/usr/local/FileGDB_API-64gcc51 \
--with-static-proj4 && \
make && make install && ldconfig
WORKDIR /data
VOLUME /data
ENV PATH "$PATH:/opt/mssql-tools/bin"
CMD ["ogr2ogr", "--formats"]