-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
174 lines (155 loc) · 4.38 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
FROM debian:buster as builder
LABEL maintainer="PDOK dev <https://github.com/PDOK/mapserver-docker/issues>"
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Europe/Amsterdam
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
ca-certificates \
gettext \
xz-utils \
cmake \
gcc \
g++ \
libfreetype6-dev \
libglib2.0-dev \
libcairo2-dev \
git \
locales \
make \
patch \
openssh-server \
protobuf-compiler \
protobuf-c-compiler \
software-properties-common \
wget && \
rm -rf /var/lib/apt/lists/*
RUN update-locale LANG=C.UTF-8
ENV HARFBUZZ_VERSION 2.8.2
RUN cd /tmp && \
wget https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/harfbuzz-$HARFBUZZ_VERSION.tar.xz && \
tar xJf harfbuzz-$HARFBUZZ_VERSION.tar.xz && \
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 \
librsvg2-dev \
libprotobuf-dev \
libprotobuf-c-dev \
libprotobuf-c1 \
libxslt1-dev && \
rm -rf /var/lib/apt/lists/*
RUN apt-get -y update --fix-missing
RUN git clone --single-branch -b pdok-7-6-4-patch-5 https://github.com/pdok/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=ON \
-DWITH_MYSQL=OFF \
-DWITH_FCGI=ON \
-DWITH_GEOS=ON \
-DWITH_POSTGIS=ON \
-DWITH_GDAL=ON \
-DWITH_OGR=ON \
-DWITH_CURL=ON \
-DWITH_CLIENT_WMS=ON \
-DWITH_CLIENT_WFS=ON \
-DWITH_WFS=ON \
-DWITH_WCS=ON \
-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_POINT_Z_M=ON \
-DWITH_GENERIC_NINT=OFF \
-DWITH_PROTOBUFC=ON \
-DCMAKE_PREFIX_PATH=/opt/gdal && \
make && \
make install && \
ldconfig
FROM pdok/lighttpd:1.4.67 AS service
USER root
LABEL maintainer="PDOK dev <https://github.com/PDOK/mapserver-docker/issues>"
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Europe/Amsterdam
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
ca-certificates \
libpng16-16 \
python-cairocffi-doc \
libfreetype6 \
libjpeg62-turbo \
libfcgi0ldbl \
libfribidi0 \
libgdal20 \
libgeos-c1v5 \
libglib2.0-0 \
libproj13 \
libxml2 \
libxslt1.1 \
libexempi8 \
libpq5 \
libfreetype6 \
librsvg2-2 \
libprotobuf17 \
libprotobuf-c1 \
gettext-base \
wget \
gnupg && \
rm -rf /var/lib/apt/lists/*
ADD config/lighttpd.conf /srv/mapserver/config/lighttpd.conf
ADD config/include.conf /srv/mapserver/config/include.conf
ADD config/request.lua /srv/mapserver/config/request.lua
RUN chmod o+x /usr/local/bin/mapserv
RUN apt-get clean
USER www
ENV DEBUG 0
ENV MIN_PROCS 8
ENV MAX_PROCS 8
ENV MAX_LOAD_PER_PROC 1
ENV IDLE_TIMEOUT 20
EXPOSE 80
CMD ["lighttpd", "-D", "-f", "/srv/mapserver/config/lighttpd.conf"]