/alpine-postgres

gavinmroy/alpine-postgres is a Docker image with a small disk footprint for PostgreSQL

Primary LanguageShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

alpine-postgres

Docker image with a small disk footprint for PostgreSQL that includes:

GitHub tag (latest SemVer) Docker Pulls Docker Stars

Image Tags

  • gavinmroy/alpine-postgres:latest reflects the state of master
  • gavinmroy/alpine-postgres:[PG_VERSION]-[RELEASE] reflects tagged releases

Example Usage

docker run --name postgres -d -p 5432:5432 gavinmroy/alpine-postgres:13.3-0-0

Startup DDL / SQL

To have DDL or other SQL automatically applied to the database on startup, mount the volume /docker-entrypoint-initdb.d to a directory with the SQL files you want to run.

Running pgTap Tests

To run pgTap tests you must mount your test directory to the container.

Example usage:

docker pull gavinmroy/postgres:13.3-0-0
docker run -d --name pgsql-testing -v /path/to/tests:/tests -p 5432 gavinmroy/alpine-postgres:13.3-0-0
docker exec -t -i pgsql-testing pg_prove -v /tests/*.sql