mirror of https://github.com/pelias/docker.git
John Wileczek
6 years ago
6 changed files with 75 additions and 26 deletions
@ -1,25 +1,35 @@ |
|||||||
# base image |
# base image |
||||||
FROM pelias/baseimage |
FROM ubuntu:16.04 |
||||||
|
|
||||||
# grab all of the valhalla software from ppa |
# configure env |
||||||
RUN apt-get update && \ |
ENV DEBIAN_FRONTEND 'noninteractive' |
||||||
apt-get install -y software-properties-common python-software-properties && \ |
|
||||||
add-apt-repository -y ppa:kevinkreiser/prime-server && \ |
RUN apt-get update && apt-get install -y locales apt-utils iputils-ping curl wget git-core autoconf automake libtool pkg-config python |
||||||
add-apt-repository -y ppa:valhalla-routing/valhalla && \ |
|
||||||
apt-get update && \ |
RUN apt-get install -y software-properties-common && \ |
||||||
apt-get install -y valhalla-bin && \ |
apt-get update |
||||||
rm -rf /var/lib/apt/lists/*; |
|
||||||
|
RUN add-apt-repository -y ppa:valhalla-core/valhalla && \ |
||||||
# change working dir |
apt-get update |
||||||
RUN mkdir -p /code/valhalla |
|
||||||
WORKDIR /code/valhalla |
RUN apt-get install -y valhalla-bin |
||||||
|
|
||||||
# generate config |
# configure volumes |
||||||
|
VOLUME "/data" |
||||||
|
|
||||||
|
|
||||||
|
# generate valhalla config |
||||||
RUN valhalla_build_config \ |
RUN valhalla_build_config \ |
||||||
--mjolnir-tile-dir '/data/valhalla' \ |
--mjolnir-tile-dir '/data/valhalla/valhalla_tiles' \ |
||||||
--mjolnir-tile-extract '/data/valhalla.tar' \ |
--mjolnir-tile-extract '/data/valhalla/valhalla_tiles.tar' \ |
||||||
--mjolnir-timezone '/data/valhalla/timezones.sqlite' \ |
--mjolnir-timezone '/data/valhalla/valhalla_tiles/timezones.sqlite' \ |
||||||
--mjolnir-admin '/data/valhalla/admins.sqlite' > valhalla.json |
--mjolnir-admin '/data/valhalla/valhalla_tiles/admins.sqlite' > valhalla.json |
||||||
|
|
||||||
# build script |
# build script to build tiles and export polyline data. |
||||||
RUN echo 'valhalla_build_tiles -c valhalla.json /data/openstreetmap/*.osm.pbf; valhalla_export_edges --config valhalla.json > /data/polylines/pbf_extract.polyline;' > ./docker_build.sh |
RUN echo 'mkdir -p /data/valhalla/valhalla_tiles\n' \ |
||||||
|
'touch /data/valhalla/valhalla_tiles/timezones.sqlite\n' \ |
||||||
|
'touch /data/valhalla/valhalla_tiles/admins.sqlite\n' \ |
||||||
|
'mkdir -p /data/polylines\n' \ |
||||||
|
'valhalla_build_tiles -c valhalla.json /data/openstreetmap/*.osm.pbf;\n' \ |
||||||
|
'find /data/valhalla/valhalla_tiles | sort -n | tar cf /data/valhalla/valhalla_tiles.tar --no-recursion -T - \n' \ |
||||||
|
'valhalla_export_edges --config valhalla.json >> /data/polylines/extract.0sv;' > ./docker_build.sh |
Loading…
Reference in new issue