-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (40 loc) · 1.4 KB
/
Dockerfile
File metadata and controls
46 lines (40 loc) · 1.4 KB
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
FROM ubuntu:20.04
# Instructions based on # * https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/
# https://github.com/Overv/openstreetmap-tile-server/blob/master/Dockerfile
# https://github.com/openstreetmap/mod_tile/blob/master/docs/build/building_on_ubuntu_20_04.md
ARG DEBIAN_FRONTEND=noninteractive
ARG MOD_TILE_VERSION=0.6.1
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
ca-certificates \
autoconf \
apache2-dev \
libcairo2-dev \
libcurl4-gnutls-dev \
libglib2.0-dev \
libiniparser-dev \
libmapnik-dev \
apache2 \
git \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# Setup env
RUN ln -snf /etc/localtime /usr/share/zoneinfo/America/Vancouver \
&& adduser --disabled-password --gecos "" render
RUN git clone -b $MOD_TILE_VERSION https://github.com/openstreetmap/mod_tile.git /usr/local/src/mod_tile \
&& cd /usr/local/src/mod_tile/ \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& make install-mod_tile \
&& mkdir -p /etc/renderd /var/run/renderd /var/run/apache2 \
&& chown render /etc/renderd /var/run/renderd \
&& chown -R www-data:www-data /var/log/apache2 \
&& chown -R www-data:www-data /var/run/apache2
COPY run.sh /
ENTRYPOINT ["/run.sh"]
CMD []
EXPOSE 8080
USER www-data