-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (41 loc) · 1.68 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
FROM debian:stable
MAINTAINER Yves Jacolin <[email protected]>
ENV VERSION 2016-04-02
ENV MAPCACHE_VERSION=master
RUN apt-get update
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -qqy git cmake \
build-essential \
libfcgi-dev liblz-dev libpng-dev libgdal-dev libgeos-dev \
libpixman-1-dev libsqlite0-dev libcurl4-openssl-dev \
libaprutil1-dev libapr1-dev libjpeg-dev libdpkg-dev \
libdb5.3-dev libtiff5-dev libpcre3-dev \
apache2 apache2-threaded-dev apache2-mpm-worker apache2 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/partial/* /tmp/* /var/tmp/*
RUN mkdir /build && mkdir -p /var/sig/tiles
RUN mkdir /mapcache
RUN cd /build && git clone https://github.com/mapserver/mapcache.git && \
cd /build/mapcache && git checkout ${MAPCACHE_VERSION} && \
mkdir /build/mapcache/build && cd /build/mapcache/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
.. && \
make && make install && ldconfig && \
cp /build/mapcache/mapcache.xml /mapcache/ && \
rm -Rf /build/mapcache
ADD mapcache.conf /etc/apache2/sites-available/mapcache.conf
ADD mapcache.load /etc/apache2/mods-available/mapcache.load
ADD docker-start.sh /
RUN a2enmod mapcache && \
a2dissite 000-default && \
a2ensite mapcache && \
a2dismod -f auth_basic authn_file authn_core authz_host authz_user autoindex dir status && \
rm /etc/apache2/mods-enabled/alias.conf && \
find /etc/apache2 -type f -exec sed -ri ' \
s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
' '{}' ';'
WORKDIR /mapcache
VOLUME ["/mapcache", "/var/sig/tiles"]
EXPOSE 80
CMD ["/docker-start.sh"]