-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile
46 lines (35 loc) · 1.18 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
FROM ubuntu:trusty
MAINTAINER Tom Fenton <[email protected]>
# no tty
ARG DEBIAN_FRONTEND=noninteractive
ARG OSM_VER=0.7.54
ENV EXEC_DIR=/srv/osm3s
ENV DB_DIR=/srv/osm3s/db
RUN build_deps="g++ make expat libexpat1-dev zlib1g-dev curl" \
&& set -x \
&& echo "#!/bin/sh\nexit 0" >/usr/sbin/policy-rc.d \
&& apt-get update \
&& apt-get install -y --force-yes --no-install-recommends \
$build_deps \
fcgiwrap \
nginx \
&& rm /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default \
&& rm -rf /var/lib/apt/lists/* \
&& curl -o osm-3s_v$OSM_VER.tar.gz http://dev.overpass-api.de/releases/osm-3s_v$OSM_VER.tar.gz \
&& tar -zxvf osm-3s_v${OSM_VER}.tar.gz \
&& cd osm-3s_v* \
&& ./configure CXXFLAGS="-O3" --prefix="$EXEC_DIR" \
&& make install \
&& cd .. \
&& rm -rf osm-3s_v* \
&& apt-get purge -y --auto-remove $build_deps
WORKDIR /usr/src/app
ARG PLANET_FILE=planet.osm.bz2
COPY planet.osm.bz2 .
RUN /srv/osm3s/bin/init_osm3s.sh "$PLANET_FILE" "$DB_DIR" "$EXEC_DIR" \
&& rm -f "$PLANET_FILE"
COPY nginx.conf /etc/nginx/nginx.conf
COPY overpass /etc/init.d
COPY docker-start /usr/local/sbin
CMD ["/usr/local/sbin/docker-start"]
EXPOSE 80