Sign inSign up

3liz/postgis

By 3liz

•Updated about 12 hours ago

postgresql images with postgis extension.

Image
Databases & storage
0

10K+

3liz/postgis repository overview

⁠Postgis Docker image

⁠Source

https://github.com/3liz/postgis⁠

⁠Description

This is an image adapted from the official docker postgres image⁠ that include the postgis extension.

The images are tagged postgis:<postgresql version>-<postgis-version>

⁠Usage

See the docker postgres documentation⁠.

This image is fully adapted from the original docker image with respect to configuration variables

The images may be run as simply as

docker run postgis:12-2.5 -p 127.0.0.1:5432:5432

The directory /var/lib/postgresql/data is mounted as persistent volume.

⁠Using local environment

Example:

docker run --name=$PG_CONTAINER --hostname=postgres \
    -e POSTGRES_PASSWORD=<md5password> \
    -p 127.0.0.1:5432:5432 \
    -v /custom/mount:/var/lib/postgresql/data \
    -v /custom/run:/var/run/postgresql \
    postgis:12-2.5

From the command above, you may connect to your server using your psql local command:

psql -h /custom/run/

This may be convenient if you want to run multiple postgres instances with different versions.

⁠User

By default, the image will execute the entry point as root; then, after creating postgres directories if necessary, will switch to the postgres user as determined at build time from build arguments POSTGRES_UID

The postgres uid:gid is internally set to 999:999: if started as root, ownership of $PGDATA directory is checked against the default values and the uid and gid of the postgres user will be changed accordingy.

⁠Using the --user option

The container support --user option, this is effective with mounted volumes from the host. Do not forget to precreate the directories before running the container.

Tag summary

Content type

Image

Digest

sha256:7233d4342…

Size

230.7 MB

Last updated

about 12 hours ago

docker pull 3liz/postgis:17-3