-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile.template
51 lines (48 loc) · 1.53 KB
/
Dockerfile.template
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
FROM postgis/postgis:%%PG_MAJOR%%-%%POSTGIS_VERSION%%
LABEL maintainer="pgRouting Project - https://pgrouting.org"
ENV PGROUTING_VERSION %%PGROUTING_VERSION%%
ENV PGROUTING_SHA256 %%PGROUTING_SHA256%%
RUN set -ex \
&& apt update \
&& apt install -y \
libboost-atomic%%BOOST_VERSION%% \
libboost-chrono%%BOOST_VERSION%% \
libboost-graph%%BOOST_VERSION%% \
libboost-date-time%%BOOST_VERSION%% \
libboost-program-options%%BOOST_VERSION%% \
libboost-system%%BOOST_VERSION%% \
libboost-thread%%BOOST_VERSION%% \
&& apt install -y \
build-essential \
cmake \
wget \
libboost-graph-dev \
libpq-dev \
postgresql-server-dev-${PG_MAJOR} \
&& wget -O pgrouting.tar.gz "https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz" \
&& echo "$PGROUTING_SHA256 *pgrouting.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/src/pgrouting \
&& tar \
--extract \
--file pgrouting.tar.gz \
--directory /usr/src/pgrouting \
--strip-components 1 \
&& rm pgrouting.tar.gz \
&& cd /usr/src/pgrouting \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd / \
&& rm -rf /usr/src/pgrouting \
&& apt-mark manual postgresql-%%PG_MAJOR%% \
&& apt purge -y --autoremove \
build-essential \
cmake \
wget \
libpq-dev \
libboost-graph-dev \
postgresql-server-dev-${PG_MAJOR} \
&& rm -rf /var/lib/apt/lists/*
RUN rm /docker-entrypoint-initdb.d/10_postgis.sh