From ae0607c7e75bd44c8cbe2ccaf13be1750f8d492e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 2 Dec 2019 11:10:24 +0100 Subject: [PATCH] Also install pointcloud (#163) * Also install pointcloud * Build Pointcloud against PostgreSQL 12, not 11 --- Dockerfile | 12 ++++++++++++ README.md | 2 +- docker-compose.yml | 2 +- env-data.sh | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3865dec..38fb4e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,3 +49,15 @@ ADD setup-user.sh / RUN chmod +x /docker-entrypoint.sh ENTRYPOINT /docker-entrypoint.sh + +# Compile and install PointCloud. +# NOTE: release 1.2.0 would not build against PostgreSQL-12: +# https://github.com/pgpointcloud/pointcloud/issues/248 +RUN apt-get -y update; apt-get -y install build-essential autoconf \ + postgresql-server-dev-12 libxml2-dev zlib1g-dev +RUN wget -O- \ + https://github.com/pgpointcloud/pointcloud/archive/master.tar.gz \ + | tar xz && \ + cd pointcloud-master && \ + ./autogen.sh && ./configure && make && make install && \ + cd .. && rm -Rf pointcloud-master diff --git a/README.md b/README.md index 4e0c37f..f6fa6bc 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ user name, password and/or default database name(or multiple databases comma sep * -e POSTGRES_USER= * -e POSTGRES_PASS= * -e POSTGRES_DBNAME= -* -e POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology # You can pass as many extensions as you need. +* -e POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,pointcloud,pointcloud_postgis # You can pass as many extensions as you need. * -e SSL_CERT_FILE=/your/own/ssl_cert_file.pem * -e SSL_KEY_FILE=/your/own/ssl_key_file.key * -e SSL_CA_FILE=/your/own/ssl_ca_file.pem diff --git a/docker-compose.yml b/docker-compose.yml index 98fc5e4..e8c924a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: - POSTGRES_PASS=docker - ALLOW_IP_RANGE=0.0.0.0/0 # Add extensions you need to be enabled by default in the DB. Default are the three specified below - - POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,ogr_fdw + - POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,ogr_fdw,pointcloud,pointcloud_postgis ports: - 5434:5432 restart: on-failure diff --git a/env-data.sh b/env-data.sh index f1fd574..5414a35 100644 --- a/env-data.sh +++ b/env-data.sh @@ -95,7 +95,7 @@ if [ -z "${SSL_KEY_FILE}" ]; then fi if [ -z "${POSTGRES_MULTIPLE_EXTENSIONS}" ]; then - POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster' + POSTGRES_MULTIPLE_EXTENSIONS='postgis,hstore,postgis_topology,postgis_raster,pointcloud,pointcloud_postgis' fi if [ -z "${ALLOW_IP_RANGE}" ]; then