diff --git a/Dockerfile b/Dockerfile index 36cc172..78fdd68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #--------- Generic stuff all our Dockerfiles should start with so we get caching ------------ -FROM ubuntu:trusty +FROM ubuntu:latest MAINTAINER Tim Sutton RUN export DEBIAN_FRONTEND=noninteractive diff --git a/start-postgis.sh b/start-postgis.sh index 8467e0f..df652c6 100755 --- a/start-postgis.sh +++ b/start-postgis.sh @@ -78,7 +78,7 @@ else su - postgres -c "createdb template_postgis -E UTF8 -T template0" echo "Enabling template_postgis as a template" CMD="UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';" - su - postgres -c "$CMD" + su - postgres -c "psql -c \"$CMD\"" echo "Loading postgis.sql" su - postgres -c "psql template_postgis -f $SQLDIR/postgis.sql" echo "Loading spatial_ref_sys.sql"