Skip to content

Commit

Permalink
This is a basic example of extending the postgis/postgis image to mak…
Browse files Browse the repository at this point in the history
…e CLIs available (postgis#224) (postgis#229)

* Added basic example

* Addressed comment on pull request postgis#229
  • Loading branch information
zachsa authored Apr 6, 2021
1 parent c580901 commit 9833646
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/image-with-postgis-clis/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions examples/image-with-postgis-clis/README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 9833646

Please sign in to comment.