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..f0d07e263 --- /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 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 +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