lmm-git / docker-postgres-multi

docker container which can handle multiple postgres databases and users instead of just one like the offical image.

Home Page:https://hub.docker.com/r/lmmdock/postgres-multi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-postgres-multi

Docker image to run a PostgreSQL database in a docker container with multiple users and databases.

Image is based of the official postgres:12 image. It modifies the docker-entrypoint.sh to allow setup of multiple users and databases. Therefore there are two new environment variables that can be set POSTGRES_USERS and POSTGRES_DATABASES. The functionality of POSTGRES_USER and POSTGRES_DB is unimpeded. If set the given user and database will be created in addition to the other given users.

Usage

docker run -p 5432:5432 --name postgres-multi
  -e POSTGRES_USERS="user1:password1|user2:password2|user3:password3"
  -e POSTGRES_DATABASES="db1:user1|db2:user2|db3:user3"
  -it --rm lmmdock/postgres-multi

About

docker container which can handle multiple postgres databases and users instead of just one like the offical image.

https://hub.docker.com/r/lmmdock/postgres-multi/

License:MIT License


Languages

Language:Shell 97.6%Language:Dockerfile 2.4%