diff --git a/11-2.6/Dockerfile b/11-2.6/Dockerfile new file mode 100755 index 0000000..74b94bd --- /dev/null +++ b/11-2.6/Dockerfile @@ -0,0 +1,15 @@ +FROM mdillon/postgis:11 + +LABEL author="beyoung" +LABEL email="tuwenyoung@gmail.com" + +ENV PGROUTING_MAJOR 2.6 +ENV PGROUTING_VERSION 2.6.2 + +RUN apt update && \ + apt install -y --no-install-recommends \ + postgresql-$PG_MAJOR-pgrouting && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /docker-entrypoint-initdb.d +COPY ./initdb-pgrouting.sh /docker-entrypoint-initdb.d/routing.sh diff --git a/11-2.6/initdb-pgrouting.sh b/11-2.6/initdb-pgrouting.sh new file mode 100755 index 0000000..ecabf4f --- /dev/null +++ b/11-2.6/initdb-pgrouting.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +# Perform all actions as user 'postgres' +export PGUSER=postgres + +# Add pgRouting Functions to the database +psql --dbname="$POSTGRES_DB" <