From 0985ab2092eb1443a0402ea647d7b0c6c93bebbf Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Tue, 23 Feb 2021 14:12:19 +0200 Subject: [PATCH 1/2] Added basic example --- examples/image-with-postgis-clis/Dockerfile | 6 ++++++ examples/image-with-postgis-clis/README.md | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 examples/image-with-postgis-clis/Dockerfile create mode 100644 examples/image-with-postgis-clis/README.md diff --git a/examples/image-with-postgis-clis/Dockerfile b/examples/image-with-postgis-clis/Dockerfile new file mode 100644 index 000000000..20aaf5a8c --- /dev/null +++ b/examples/image-with-postgis-clis/Dockerfile @@ -0,0 +1,6 @@ +FROM postgis/postgis:13-3.1 + +RUN apt-get update -y +RUN apt-get install postgis -y +RUN apt-get clean +RUN rm -rf /var/cache/apt/lists \ No newline at end of file diff --git a/examples/image-with-postgis-clis/README.md b/examples/image-with-postgis-clis/README.md new file mode 100644 index 000000000..54cbd6d79 --- /dev/null +++ b/examples/image-with-postgis-clis/README.md @@ -0,0 +1,10 @@ +# Using PostGIS CLIs +The base postgis/postgis image does not have PostGIS-related CLIs enabled. To use PostGIS CLIs that are NOT enabled by default (for example `raster2pgsql`) it's necessary to extend the base image. + +```sh +# Create a Docker image +docker build -t my-postgis . + +# Run as a Docker container +docker run --name my-postgis -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=password -d my-postgis +``` \ No newline at end of file From eb1de26d085a7f4e1e8ab6cdd5d0b5820584ea75 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Tue, 6 Apr 2021 09:35:03 +0200 Subject: [PATCH 2/2] Addressed comment on pull request #229 --- examples/image-with-postgis-clis/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/image-with-postgis-clis/README.md b/examples/image-with-postgis-clis/README.md index 54cbd6d79..f0d07e263 100644 --- a/examples/image-with-postgis-clis/README.md +++ b/examples/image-with-postgis-clis/README.md @@ -1,5 +1,5 @@ # Using PostGIS CLIs -The base postgis/postgis image does not have PostGIS-related CLIs enabled. To use PostGIS CLIs that are NOT enabled by default (for example `raster2pgsql`) it's necessary to extend the base image. +The base postgis/postgis image does not have PostGIS-related CLIs installed. To use PostGIS CLIs that are NOT installed by default (for example `raster2pgsql`) it's necessary to extend the base image. ```sh # Create a Docker image