Skip to content

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

License

Notifications You must be signed in to change notification settings

lmm-git/docker-postgres-multi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published