Skip to content

Commit 9833646

Browse files
authored
This is a basic example of extending the postgis/postgis image to make CLIs available (#224) (#229)
* Added basic example * Addressed comment on pull request #229
1 parent c580901 commit 9833646

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM postgis/postgis:13-3.1
2+
3+
RUN apt-get update -y
4+
RUN apt-get install postgis -y
5+
RUN apt-get clean
6+
RUN rm -rf /var/cache/apt/lists
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Using PostGIS CLIs
2+
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.
3+
4+
```sh
5+
# Create a Docker image
6+
docker build -t my-postgis .
7+
8+
# Run as a Docker container
9+
docker run --name my-postgis -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=password -d my-postgis
10+
```

0 commit comments

Comments
 (0)