forked from PDOK/mapserver-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.mongocxx
250 lines (224 loc) · 6.94 KB
/
Dockerfile.mongocxx
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
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 \
libsasl2-dev \
libssl-dev \
libboost-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 MONGO_C_DRIVER_VERSION=1.17.7
RUN cd /tmp \
&& mkdir mongo-c-driver \
&& wget -q https://github.com/mongodb/mongo-c-driver/releases/download/${MONGO_C_DRIVER_VERSION}/mongo-c-driver-${MONGO_C_DRIVER_VERSION}.tar.gz -O - \
| tar xz -C mongo-c-driver --strip-components=1 \
&& cd mongo-c-driver \
&& mkdir cmake_build \
&& cd cmake_build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_TESTS=NO -DCMAKE_BUILD_TYPE=Release \
&& make -j$(nproc) \
&& make install \
&& ldconfig
ENV MONGOCXX_VERSION=3.6.6
RUN cd /tmp \
&& mkdir mongocxx \
&& wget -q https://github.com/mongodb/mongo-cxx-driver/archive/r${MONGOCXX_VERSION}.tar.gz -O - \
| tar xz -C mongocxx --strip-components=1 \
&& cd mongocxx \
&& mkdir cmake_build \
&& cd cmake_build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DBSONCXX_POLY_USE_BOOST=ON -DMONGOCXX_ENABLE_SLOW_TESTS=NO -DCMAKE_BUILD_TYPE=Release -DBUILD_VERSION=${MONGOCXX_VERSION} \
&& make -j$(nproc) \
&& make install \
&& ldconfig
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
python3-dev \
sqlite3 \
libcurl4-gnutls-dev \
libfribidi-dev \
libgif-dev \
libjpeg-dev \
libpq-dev \
librsvg2-dev \
libpng-dev \
libfreetype6-dev \
libjpeg-dev \
libexempi-dev \
libfcgi-dev \
libgeos-dev \
libproj-dev \
librsvg2-dev \
libprotobuf-dev \
libprotobuf-c-dev \
libprotobuf-c1 \
libsqlite3-dev \
libtiff-dev \
libxslt1-dev && \
rm -rf /var/lib/apt/lists/*
RUN apt-get -y update --fix-missing
ENV PROJ_VERSION=8.2.1
RUN cd /tmp \
&& mkdir proj \
&& wget -q https://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz -O - \
| tar xz -C proj --strip-components=1 \
&& cd proj \
&& mkdir build \
&& cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \
&& cmake --build . -j $(nproc)\
&& cmake --build . --target install \
&& ldconfig
ENV GDAL_VERSION=3.3.3
RUN cd /tmp && \
git clone https://github.com/OSGeo/gdal.git && \
cd gdal && \
git checkout v${GDAL_VERSION} && \
cd gdal && \
./configure --prefix=/usr/local \
--with-proj=/usr/local \
--with-png=internal \
--with-jpeg=internal \
--with-libz=internal \
--with-libtiff=internal \
--with-geotiff=internal \
--with-gif=internal \
--with-libjson-c=internal \
--with-poppler \
--with-spatialite \
--with-python \
--with-liblzma \
--with-openjpeg \
--with-ogdi \
--with-webp \
--with-pg \
--with-libkml \
--with-filegdb \
--with-mongocxxv3 \
--with-openjpeg && \
make -j$(nproc) && \
make install && \
cd swig/python && python3 setup.py build && python3 setup.py install && \
ldconfig
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=OFF \
-DWITH_HARFBUZZ=OFF \
-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 -j$(nproc) && \
make install && \
ldconfig
FROM pdok/lighttpd:1.4.63-buster as service
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
COPY --from=builder /usr/local/share/proj /usr/local/share/proj
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
ca-certificates \
libpng16-16 \
python-cairocffi-doc \
libfreetype6 \
libjpeg62-turbo \
libfcgi0ldbl \
libgeos-c1v5 \
libglib2.0-0 \
libxml2 \
libxslt1.1 \
libexempi8 \
libpq5 \
libfreetype6 \
librsvg2-2 \
libprotobuf17 \
libprotobuf-c1 \
gettext-base \
wget \
libcurl3-gnutls \
libgif7 \
gnupg && \
rm -rf /var/lib/apt/lists/*
COPY etc/lighttpd.conf /lighttpd.conf
COPY etc/filter-map.lua /filter-map.lua
RUN chmod o+x /usr/local/bin/mapserv
RUN apt-get clean
# Download NL projection
RUN wget https://github.com/OSGeo/proj-datumgrid/releases/download/europe-1.6/proj-datumgrid-europe-1.6.tar.gz && \
mkdir proj-datumgrid-europe-1.6 && \
tar xzvf proj-datumgrid-europe-1.6.tar.gz -C /proj-datumgrid-europe-1.6 && \
mv /proj-datumgrid-europe-1.6/rdtrans2018.gsb /usr/local/share/proj/rdtrans2018.gsb && \
mv /proj-datumgrid-europe-1.6/naptrans2018.gtx /usr/local/share/proj/naptrans2018.gtx && \
rm -rf proj-datumgrid*
COPY nl/epsg /usr/local/share/proj
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"]