Public | Automated Build

Last pushed: a month ago
Short Description
Short description is empty for this repo.
Full Description


PostgreSQL, on top of Debian Wheezy.

Installation and Usage

docker pull${VERSION:-latest}

This is an image conforming to the Aptible database specification. To run a server for development purposes, execute

docker create --name data
docker run --volumes-from data -e USERNAME=aptible -e PASSPHRASE=pass -e DB=db --initialize
docker run --volumes-from data -P

The first command sets up a data container named data which will hold the configuration and data for the database. The second command creates a PostgreSQL instance with a username, passphrase and database name of your choice. The third command starts the database server.


The PostgreSQL server is configured to enforce SSL for any TCP connection. Important note: Because the key and certificate used for SSL negotiation are included in the Docker image, and shared by all Docker clients running the same version of the image, a PostgreSQL server launched with just docker run is NOT suitable for production.

To generate a unique key/certificate pair, you have two options:

  1. Build directly from the Dockerfile, disabling caching:

     docker build --no-cache .
  2. Initialize a new key and certificate in the host volume and mount that directory into the Docker container, as follows:

     cd <host-mountpoint>/ssl
     openssl req -new -newkey rsa:1024 -days 365000 -nodes -x509 \
       -keyout server.key -subj "/CN=PostgreSQL" -out server.crt
     chmod og-rwx server.key
     docker run -v <host-mountpoint>/ssl:/etc/postgresql/9.4/ssl -u root \ chown -R postgres:postgres /etc/postgresql/9.4
     docker run -v <host-mountpoint>/ssl:/etc/postgresql/9.4/ssl \

Available Versions (Tags)

  • latest: Currently PostgreSQL 9.4.5
  • 9.4: PostgreSQL 9.4.5
  • 9.3: PostgreSQL 9.3.8


Tests are run as part of the Dockerfile build. To execute them separately within a container, run:

bats test


To push the Docker image to Quay, run the following command:

make release

Continuous Integration

Images are built and pushed to Docker Hub on every deploy. Because Quay currently only supports build triggers where the Docker tag name exactly matches a GitHub branch/tag name, we must run the following script to synchronize all our remote branches after a merge to master:

make sync-branches

Copyright and License

MIT License, see LICENSE for details.

Copyright (c) 2015 Aptible and contributors.

<img src="" style="border-radius: 50%;" alt="@fancyremarker" />

Docker Pull Command
Source Repository