forked from chesty/renderd-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
139 lines (124 loc) · 3.71 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
FROM postgres:10 as buildstage
ENV BUMP 2019011101
RUN apt update && \
apt -y install \
apache2-dev \
autoconf \
build-essential \
curl \
gdal-bin \
git \
libboost-all-dev \
libbz2-dev \
libcairo2-dev \
libcairomm-1.0-dev \
libfreetype6-dev \
libgdal-dev \
libharfbuzz-dev \
libicu-dev \
libjpeg-dev \
libltdl-dev \
libpng-dev \
libpq-dev \
libproj-dev \
libsqlite3-dev \
libtiff5-dev \
libwebp-dev \
libxml2-dev \
pktools \
pktools-dev \
postgresql-10-pgrouting \
postgresql-10-pgrouting-scripts \
postgresql-10-postgis \
postgresql-10-postgis-scripts \
postgresql-contrib \
postgresql-server-dev-10 \
python-cairo-dev \
python-dev \
python-gdal \
python-nose \
python-pip \
python3-pip \
ttf-dejavu \
ttf-dejavu-core \
ttf-dejavu-extra \
ttf-unifont
RUN pip3 install osmium
RUN pip install osmium
ENV MAPNIK_VERSION v3.0.22
RUN git clone --depth 1 --branch $MAPNIK_VERSION --single-branch http://github.com/mapnik/mapnik
RUN cd /mapnik && \
git submodule update --init
RUN cd /mapnik && \
./configure && \
make && \
make install
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt update && \
apt install -y nodejs && \
npm --unsafe-perm -g install millstone carto mapnik
RUN git clone --depth 1 https://github.com/openstreetmap/mod_tile/
RUN cd mod_tile && \
./autogen.sh && \
./configure && \
make && \
make install && \
make install-mod_tile && \
ldconfig && \
cp debian/tileserver_site.conf /usr/local/etc && \
cp debian/tile.load /usr/local/etc && \
cp /usr/lib/apache2/modules/mod_tile.so /usr/local/lib/mod_tile.so
RUN mkdir -p /usr/local/share/ && \
cd /usr/local/share && \
git clone --depth 1 http://github.com/mapbox/osm-bright.git && \
git clone --depth 1 https://github.com/gravitystorm/openstreetmap-carto.git
FROM postgres:10 as runstage
COPY --from=buildstage /usr/local/ /usr/local/
RUN apt update && \
apt -y install \
apache2 \
curl \
fonts-dejavu-core \
fonts-hanazono \
fonts-noto-cjk \
fonts-noto-hinted \
fonts-noto-unhinted \
gosu \
netcat-traditional \
libboost-python1.62.0 \
libboost-regex1.62.0 \
osm2pgsql \
osmosis \
postgresql-10-pgrouting \
postgresql-10-pgrouting-scripts \
postgresql-10-postgis \
postgresql-10-postgis-scripts \
postgresql-contrib \
ttf-dejavu \
ttf-dejavu-core \
ttf-dejavu-extra \
ttf-unifont && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt update && \
apt install -y nodejs && \
npm --unsafe-perm -g install carto mapnik && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mv /usr/local/lib/mod_tile.so /usr/lib/apache2/modules/mod_tile.so && \
mv /usr/local/etc/tile.load /etc/apache2/mods-available && \
cd /etc/apache2/mods-enabled && \
ln -sf ../mods-available/tile.load && \
mv /usr/local/etc/tileserver_site.conf /etc/apache2/sites-available && \
cd /etc/apache2/sites-enabled && \
rm * && \
ln -s ../sites-available/tileserver_site.conf && \
useradd -ms /bin/bash osm && \
ldconfig
COPY renderd-docker-entrypoint.sh /usr/local/bin/
COPY osm-config.sh /usr/local/etc/
VOLUME /data
EXPOSE 80
EXPOSE 7653
ENTRYPOINT ["renderd-docker-entrypoint.sh"]