Public | Automated Build

Last pushed: 3 months ago
Short Description
Postgres streaming replication
Full Description

Postgres Streaming Replication

Enhanced version of the official Postgres image to support streaming replication
out of the box.

Postgres-replication is meant to be used with orchestration systems such as Kubernetes.


Images are automatically updated when the official postgres image
is updated.

Supported tags:

  • 9.6, 9, latest (9.6)
  • 9.5 (9.5)

Run with Docker Compose

docker-compose up

Run with Docker

To run with Docker, first run the Postgres master:

docker run -p --name postgres-master nebirhos/postgres-replication

Then Postgres slave(s):

docker run -p --link postgres-master \
           -e POSTGRES_MASTER_SERVICE_HOST=postgres-master \
           -e REPLICATION_ROLE=slave \
           -t nebirhos/postgres-replication


Replication is set up at container start by putting scripts in the /docker-entrypoint-initdb.d folder.
This way the original Postgres image scripts are left untouched.

See Dockerfile and official Postgres image
for custom environment variables.

Docker Pull Command