forked from postgis/docker-postgis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a basic example of extending the postgis/postgis image to mak…
…e CLIs available (postgis#224) (postgis#229) * Added basic example * Addressed comment on pull request postgis#229
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |