-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (55 loc) · 1.62 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
FROM pgrouting/pgrouting:13-3.1-3.2.0
LABEL maintainer="pgRouting Project - https://pgrouting.net"
ENV VRPROUTING_VERSION develop
ENV VRPROUTING_GIT_HASH 40f1c5314f0e00d509cbd22689d7bdecd9789e75
RUN set -ex \
&& apt update \
&& apt install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
libboost-graph-dev \
libpq-dev \
postgresql-server-dev-${PG_MAJOR} \
# vroom dependency
libasio-dev \
libglpk-dev \
libssl-dev \
# build vroom
&& wget -O vroom.tar.gz "https://github.com/VROOM-Project/vroom/archive/v1.12.0.tar.gz" \
&& mkdir -p /usr/src/vroom \
&& tar \
--extract \
--file vroom.tar.gz \
--directory /usr/src/vroom \
--strip-components 1 \
&& rm vroom.tar.gz \
&& cd /usr/src/vroom/src \
&& sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile \
&& make \
# build vrprouting
&& mkdir -p /usr/src/vrprouting \
&& cd /usr/src/vrprouting \
&& git init \
&& git remote add origin https://github.com/pgRouting/vrprouting.git \
&& git fetch --depth 1 origin :${VRPROUTING_GIT_HASH} \
&& git reset --hard FETCH_HEAD \
&& mkdir build \
&& cd build \
&& cmake -DVROOM_INSTALL_PATH=/usr/src/vroom .. \
&& make \
&& make install \
&& cd / \
&& rm -rf /usr/src/vrprouting \
&& rm -rf /usr/src/vroom \
&& apt purge -y --autoremove \
build-essential \
cmake \
git \
libpq-dev \
libboost-graph-dev \
postgresql-server-dev-${PG_MAJOR} \
libasio-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*