-
Notifications
You must be signed in to change notification settings - Fork 5
/
import.Dockerfile
80 lines (62 loc) · 1.94 KB
/
import.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
77
78
79
80
FROM debian:12-slim as compilation
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgdal-dev \
build-essential \
&& rm -rf /var/lib/apt/lists/* && apt-get clean
RUN mkdir -p /compilation
WORKDIR /compilation
COPY scripts/isolation.c .
RUN gcc isolation.c -Wall -o isolation -lgdal -lm -O2
FROM debian:12-slim as generation
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir -p /generation
WORKDIR /generation
ENV PATH $PATH:/generation
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
python3 \
python3-distutils \
python3-lxml \
python3-pip \
&& pip3 install --no-cache-dir --break-system-packages pyyaml \
&& rm -rf /var/lib/apt/lists/* && apt-get clean
COPY legend/legend.yaml .
COPY scripts/generate/legend.py .
RUN chmod +x legend.py
RUN legend.py legend.yaml > legend.osm
FROM debian:12-slim
LABEL maintainer="Hidde Wieringa <hidde@hiddewieringa.nl>"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
unzip \
gdal-bin \
osm2pgsql \
postgresql-client \
postgis \
python3-gdal \
python3-bs4 \
python3-lxml \
libboost-dev \
libgdal-dev \
osmium-tool \
&& rm -rf /var/lib/apt/lists/* && apt-get clean
# Install phyghtmap
COPY scripts/phyghtmap /usr/lib/phyghtmap
RUN ln -s /usr/lib/phyghtmap/main.py /usr/bin/phyghtmap
RUN chmod +x /usr/lib/phyghtmap/main.py
RUN mkdir -p /data
RUN mkdir -p /style
RUN mkdir -p /script
ENV PATH $PATH:/script
WORKDIR /data
COPY --from=compilation /compilation/isolation /script
COPY --from=generation /generation/legend.osm /legend/legend.osm
COPY style/map-it.style /script/map-it.style
COPY scripts/download.sh /script/download.sh
COPY style/shade /style/shade
RUN chmod +x /script/download.sh
CMD ["download.sh"]