forked from JamesSaxon/routing-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 1.23 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
FROM postgres:10
MAINTAINER James Saxon <[email protected]>
ENV POSTGIS_MAJOR 2.5
ENV POSTGIS_VERSION 2.5.2+dfsg-1~exp1.pgdg90+1
ENV PGROUTING_MAJOR 2.3
ENV PGROUTING_VERSION 2.3.0-1
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \
postgis=$POSTGIS_VERSION \
postgresql-$PG_MAJOR-pgrouting \
vim wget \
git pkg-config build-essential
# osm2pgrouting Requirements
RUN apt-get install -y cmake expat libexpat1-dev \
libboost-dev libboost-program-options-dev libpqxx-dev
# compile osm2pgrouting
ENV OSM_2_PGROUTING_VERSION=2.3.3
RUN git clone https://github.com/pgRouting/osm2pgrouting.git
RUN cd osm2pgrouting && \
git fetch --all && git checkout v${OSM_2_PGROUTING_VERSION} && \
cmake -H. -Bbuild && \
cd build/ && make && make install
COPY docker-build-and-query.sh \
start-postgres-db.sh \
stop-postgres-db.sh \
/usr/local/bin/
RUN ln -s usr/local/bin/docker-build-and-query.sh /
RUN ln -s usr/local/bin/start-postgres-db.sh /
RUN ln -s usr/local/bin/stop-postgres-db.sh /
ENTRYPOINT ["docker-build-and-query.sh"]