-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
61 lines (50 loc) · 1.47 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
FROM python:3.7-slim AS environment
RUN apt-get update
RUN apt-get install -y \
gdal-bin \
sqlite3 \
#libsqlite3-mod-spatialite \
libsqlite3-dev \
#liblwgeom-2.5-0 \
python3-dev \
build-essential \
libxml2-dev \
libproj-dev \
libgeos-dev \
zlib1g-dev \
pkg-config \
automake \
autoconf \
autotools-dev \
#m4 \
libtool
ADD https://git.osgeo.org/gitea/rttopo/librttopo/archive/master.tar.gz /tmp
RUN tar zxf /tmp/master.tar.gz -C /tmp && rm /tmp/master.tar.gz
RUN cd /tmp/librttopo && \
./autogen.sh && \
./configure && \
make && \
make check && \
make install
ADD https://www.gaia-gis.it/gaia-sins/freexl-1.0.5.tar.gz /tmp
RUN tar zxf /tmp/freexl-1.0.5.tar.gz -C /tmp && rm /tmp/freexl-1.0.5.tar.gz
RUN cd /tmp/freexl-1.0.5 && \
./configure && \
make && \
make install
ADD http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.0.0-beta0.tar.gz /tmp
RUN tar zxf /tmp/libspatialite-5.0.0-beta0.tar.gz -C /tmp && rm /tmp/libspatialite-5.0.0-beta0.tar.gz
RUN cd /tmp/libspatialite-5.0.0-beta0 && \
./configure --enable-rttopo=yes --enable-gcp=yes && \
make -j8 && \
make install-strip
RUN /sbin/ldconfig -v
RUN ln -s /usr/local/lib/mod_spatialite.so.7.1.0 /usr/lib/mod_spatialite.so
FROM environment AS application
RUN mkdir -p /app
WORKDIR /app
ADD requirements.txt /app
RUN pip install -r requirements.txt
ADD main.py /app
VOLUME ["/app"]
CMD ["python", "main.py"]