-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
67 lines (50 loc) · 1.49 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
#
# ABOUT
#
# ncareol/mod_tile: Docker image for running Apache w/ mod_tile, for serving static,
# pregenerated OSM tiles
#
FROM debian:jessie
MAINTAINER Erik Johnson <ej@ucar.edu>
RUN apt-get update \
&& apt-get install -y git autoconf libtool \
libxml2-dev libbz2-dev libssl-dev libpq-dev libgdal1-dev g++ \
libmapnik-dev mapnik-utils python-mapnik
#
# apache
#
RUN apt-get install -y apache2 apache2-dev
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock
#
# mod_tile
#
#
# Install
#
RUN cd /tmp && git clone git://github.com/openstreetmap/mod_tile.git && \
cd /tmp/mod_tile && \
./autogen.sh && \
./configure && \
make && \
make install && \
make install-mod_tile && \
ldconfig && \
cd /tmp && rm -rf /tmp/mod_tile
#
# Configure
#
RUN echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" > /etc/apache2/mods-available/mod_tile.load
RUN ln -s /etc/apache2/mods-available/mod_tile.load /etc/apache2/mods-enabled/
COPY renderd.conf /etc
COPY mod_tile.conf /etc/apache2/sites-available/000-mod_tile.conf
RUN rm /etc/apache2/sites-enabled/000-default.conf \
&& ln -s /etc/apache2/sites-available/000-mod_tile.conf /etc/apache2/sites-enabled/
COPY index.html /var/www/html/index.html
EXPOSE 80
COPY apache2-foreground /usr/local/bin/
CMD ["apache2-foreground"]