-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (17 loc) · 980 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM starefossen/pgrouting:9-2-2
MAINTAINER Den Norske Turistforening (DNT) <[email protected]>
ARG N50_URL
ENV N50_URL ${N50_URL:-"https://s3-eu-west-1.amazonaws.com/turistforeningen/postgis"}
ARG N50_DATE
ENV N50_DATE ${N50_DATE:-"16-06-14"}
# Download pgRouting compatible and pre-processed version of N50 data from S3
ADD "${N50_URL}/n50_vegsti-${N50_DATE}.backup" /n50_vegsti.backup
# Set permissions allowing all users to read file
RUN chmod 755 /n50_vegsti.backup
# Add the database init script which will be run when running the Docker Image
# for the first time. This will not be run if an existing database exists.
# https://github.com/docker-library/docs/tree/master/postgres#how-to-extend-this-image
COPY ./n50_init.sh /docker-entrypoint-initdb.d/routingx50.sh
# Add the psql router function `path` this is the function that does the
# shortest path routing on the N50 vegsti data.
COPY ./n50_path.sql /docker-entrypoint-initdb.d/routingx50path.sql