-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
179 lines (169 loc) · 4.39 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
175
176
177
178
179
FROM ubuntu:xenial
ENV OSRM_BACKEND_VERSION v5.10.0
RUN apt-get update && \
apt-get install -qq \
build-essential \
cmake \
git-core \
libboost-all-dev \
libboost-filesystem1.58.0 \
libboost-iostreams1.58.0 \
libboost-program-options1.58.0 \
libboost-regex1.58.0 \
libboost-system1.58.0 \
libboost-thread1.58.0 \
libbz2-dev \
libexpat1 \
libgomp1 \
liblua5.2-dev \
liblua5.2-0 \
libluabind-dev \
libluabind0.9.1v5 \
libosmpbf-dev \
libpng16-dev \
libprotobuf-dev \
libprotobuf9v5 \
libprotoc-dev \
libstxxl-dev \
libstxxl1v5 \
libtbb-dev \
libtbb2 \
libxml2-dev \
libzip-dev \
lua5.2 \
luajit \
pkg-config \
protobuf-compiler && \
mkdir -p /src && \
cd /src && \
git clone --depth 10 --branch $OSRM_BACKEND_VERSION https://github.com/Project-OSRM/osrm-backend && \
cd osrm-backend && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
cmake --build . && \
cmake --build . --target install && \
mkdir -p /usr/local/share/osrm && \
cp -a /src/osrm-backend/profiles /usr/local/share/osrm && \
apt-get purge -qq \
'*-dev' \
build-essential \
cmake \
git-core \
krb5-locales \
make \
wget && \
apt-get autoremove --purge -qq && \
apt-get clean && \
cd / && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src
ENV VROOM_BRANCH master
RUN mkdir -p /src && \
cd /src && \
apt-get update && \
apt-get install -qq \
build-essential \
g++ \
git-core \
libboost-iostreams1.58-dev \
libboost-iostreams1.58.0 \
libboost-log-dev \
libboost-log1.58.0 \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
libtbb-dev \
libtbb2 \
make \
pkg-config && \
git clone --depth 10 --branch $VROOM_BRANCH https://github.com/VROOM-Project/vroom.git && \
cd vroom && \
git submodule init && \
git submodule update && \
cd .. && \
mkdir -p /src/vroom/bin && \
cd /src/vroom/src && \
make && \
cp /src/vroom/bin/vroom /usr/local/bin && \
apt-get purge -qq \
'*-dev' \
build-essential \
git-core \
make && \
apt-get autoremove --purge -qq && \
apt-get clean && \
cd / && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src
ENV VROOM_EXPRESS_BRANCH master
RUN apt-get update && \
apt-get install -qq \
build-essential \
git-core \
npm \
nodejs-legacy && \
cd / && \
git clone --depth 10 --branch $VROOM_EXPRESS_BRANCH https://github.com/VROOM-Project/vroom-express.git && \
cd vroom-express && \
ln -s /dev/stdout access.log && \
npm install && \
apt-get purge -qq \
build-essential \
git-core \
make && \
apt-get autoremove --purge -qq && \
apt-get clean && \
cd / && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src
ENV VROOM_FRONTEND_BRANCH master
RUN apt-get update && \
apt-get install -qq \
build-essential \
git-core \
npm \
nodejs-legacy && \
cd / && \
git clone --depth 10 --branch $VROOM_FRONTEND_BRANCH https://github.com/VROOM-Project/vroom-frontend.git && \
cd vroom-frontend && \
npm install && \
cd /vroom-frontend/src && \
make && \
apt-get purge -qq \
build-essential \
git-core \
make && \
apt-get autoremove --purge -qq && \
apt-get clean && \
cd / && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src
# copied from postgres dockerfile
ENV GOSU_VERSION 1.10
RUN set -x \
&& apt-get update && apt-get install -qq --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true
RUN apt-get update && \
apt-get install -qq \
curl \
iproute \
iputils-ping \
nginx \
supervisor \
wget && \
apt-get clean && \
cd / && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /src
COPY osrm.sh /usr/local/bin
COPY vroom-express.sh /usr/local/bin
COPY nginx.sh /usr/local/bin
COPY start.sh /usr/local/bin
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
VOLUME /osm
EXPOSE 5000
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/start.sh"]