This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
153 lines (136 loc) · 3.73 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
FROM debian:stretch as builder
LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Europe/Amsterdam
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
ca-certificates \
gettext \
bzip2 \
cmake \
g++ \
git \
libcairo2-dev \
locales \
make \
openssh-server \
software-properties-common \
wget && \
rm -rf /var/lib/apt/lists/*
RUN update-locale LANG=C.UTF-8
ENV HARFBUZZ_VERSION 1.2.4
RUN cd /tmp && \
wget https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-$HARFBUZZ_VERSION.tar.bz2 && \
tar xjf harfbuzz-$HARFBUZZ_VERSION.tar.bz2 && \
cd harfbuzz-$HARFBUZZ_VERSION && \
./configure && \
make && \
make install && \
ldconfig
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
libcurl4-gnutls-dev \
libfribidi-dev \
libgif-dev \
libjpeg-dev \
libpq-dev \
librsvg2-dev \
libpng-dev \
libfreetype6-dev \
libjpeg-dev \
libexempi-dev \
libfcgi-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
libxslt1-dev && \
rm -rf /var/lib/apt/lists/*
RUN git clone --single-branch -b branch-7-2 https://github.com/mapserver/mapserver/ /usr/local/src/mapserver
RUN mkdir /usr/local/src/mapserver/build && \
cd /usr/local/src/mapserver/build && \
cmake ../ \
-DWITH_PROJ=ON \
-DWITH_KML=OFF \
-DWITH_SOS=OFF \
-DWITH_WMS=ON \
-DWITH_FRIBIDI=ON \
-DWITH_HARFBUZZ=ON \
-DWITH_ICONV=ON \
-DWITH_CAIRO=ON \
-DWITH_SVGCAIRO=OFF \
-DWITH_RSVG=OFF \
-DWITH_MYSQL=OFF \
-DWITH_FCGI=ON \
-DWITH_GEOS=ON \
-DWITH_POSTGIS=OFF \
-DWITH_GDAL=OFF \
-DWITH_OGR=ON \
-DWITH_CURL=OFF \
-DWITH_CLIENT_WMS=OFF \
-DWITH_CLIENT_WFS=OFF \
-DWITH_WFS=OFF \
-DWITH_WCS=OFF \
-DWITH_LIBXML2=ON \
-DWITH_THREAD_SAFETY=OFF \
-DWITH_GIF=ON \
-DWITH_PYTHON=OFF \
-DWITH_PHP=OFF \
-DWITH_PERL=OFF \
-DWITH_RUBY=OFF \
-DWITH_JAVA=OFF \
-DWITH_CSHARP=OFF \
-DWITH_ORACLESPATIAL=OFF \
-DWITH_ORACLE_PLUGIN=OFF \
-DWITH_MSSQL2008=OFF \
-DWITH_SDE_PLUGIN=OFF \
-DWITH_SDE=OFF \
-DWITH_EXEMPI=ON \
-DWITH_XMLMAPFILE=ON \
-DWITH_V8=OFF \
-DBUILD_STATIC=OFF \
-DLINK_STATIC_LIBMAPSERVER=OFF \
-DWITH_APACHE_MODULE=OFF \
-DWITH_GENERIC_NINT=OFF \
-DWITH_USE_POINT_Z_M=ON \
-DWITH_PROTOBUFC=OFF \
-DCMAKE_PREFIX_PATH=/opt/gdal && \
make && \
make install && \
ldconfig
FROM debian:stretch as service
LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Europe/Amsterdam
COPY --from=0 /usr/local/bin /usr/local/bin
COPY --from=0 /usr/local/lib /usr/local/lib
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
libpng16-16 \
python-cairo \
libfreetype6 \
libjpeg62-turbo \
libfcgi0ldbl \
libfribidi0 \
libgdal20 \
libgeos-c1v5 \
libglib2.0-0 \
libproj12 \
libxml2 \
libxslt1.1 \
libexempi3 \
gettext-base \
wget \
lighttpd \
gnupg && \
rm -rf /var/lib/apt/lists/*
COPY etc/epsg /usr/share/proj
COPY etc/lighttpd.conf /lighttpd.conf
RUN chmod o+x /usr/local/bin/mapserv
RUN apt-get clean
ENV DEBUG 0
ENV MIN_PROCS 1
ENV MAX_PROCS 3
ENV MAX_LOAD_PER_PROC 4
ENV IDLE_TIMEOUT 20
EXPOSE 80
CMD ["lighttpd", "-D", "-f", "/lighttpd.conf"]