This repository has been archived by the owner on Jan 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
100 lines (79 loc) · 2.86 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
FROM phusion/baseimage:0.9.17
CMD ["/sbin/my_init"]
EXPOSE 8002
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt-get update && apt-get install -y \
autoconf \
automake \
libtool \
make \
gcc-4.9 \
g++-4.9 \
libboost1.54-dev \
libboost-program-options1.54-dev \
libboost-filesystem1.54-dev \
libboost-system1.54-dev \
libboost-thread1.54-dev \
protobuf-compiler \
libprotobuf-dev \
lua5.2 \
liblua5.2-dev \
git \
libsqlite3-dev \
libspatialite-dev \
libgeos-dev \
libgeos++-dev \
libcurl4-openssl-dev \
wget
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90
RUN mkdir /valhalla
WORKDIR /valhalla
RUN git clone --depth=1 --recurse-submodules --single-branch --branch=master https://github.com/zeromq/libzmq.git
RUN cd libzmq && \
./autogen.sh && \
./configure --without-libsodium --without-documentation && \
make -j4 && \
make install && \
cd ..
RUN git clone --depth=1 --recurse-submodules --single-branch --branch=master https://github.com/kevinkreiser/prime_server.git
RUN cd prime_server && \
./autogen.sh && \
./configure && \
make -j4 && \
make install && \
cd ..
ADD midgard midgard
RUN cd midgard && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD baldr baldr
RUN cd baldr && \
./autogen.sh && \
./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && \
make valhalla/baldr/date_time_zonespec.h && \
make -j4 && \
make install \
&& cd ..
ADD sif sif
RUN cd sif && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD skadi skadi
RUN cd skadi && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD mjolnir mjolnir
RUN cd mjolnir && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD loki loki
RUN cd loki && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD odin odin
RUN cd odin && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD thor thor
RUN cd thor && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
ADD tyr tyr
RUN cd tyr && ./autogen.sh && ./configure CPPFLAGS=-DBOOST_SPIRIT_THREADSAFE && make -j4 && make install && cd ..
RUN ldconfig
# Change this OSM extract to somewhere else if you like.
RUN wget https://s3.amazonaws.com/metro-extracts.mapzen.com/london_england.osm.pbf
RUN mkdir -p /data/valhalla
ADD conf conf
RUN pbfadminbuilder -c conf/valhalla.json *.pbf
RUN pbfgraphbuilder -c conf/valhalla.json *.pbf
RUN mkdir /etc/service/tyr
ADD tyr.sh /etc/service/tyr/run
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*