Public Repository

Last pushed: 2 years ago
Short Description
PostgreSQL database
Full Description

Docker PostgreSQL 9.6 container

This project is a PostgreSQL (postgres) 9.6 build running on a base OS of CentOS 6. Postgres is installed from the official Postgres repositories, with support from EPEL for the PostGIS and PL/R modules.

Port 5432 is exposed for linking to other containers.

The first time you launch the container, the docker-entrypoint script will look for a PG_VERSION file in $DATADIR (typically /var/lib/pgsql/9.6/data/). If it doesn't find that, it will attempt to perform an initdb operation and then copy in the contents of the included pg_hba.conf and postgresql.conf files. If PG_VERSION does exist, it skips those steps.

Environment Variables

None. This is a stock install, so data lives in /var/lib/pgsql/9.6/data/.


  • /var/lib/pgsql/9.6/data/

The only volume present is to ensure the persistence of data and configurations across container rebuilds and restarts.

Example Usage

docker run --name="somepostgres" -v /opt/pgsql:/var/lib/pgsql/9.6/data/ -p 5432:5432 -d enterbridge/postgres

Other Files

Docker Pull Command