HUB
Sign inSign up

michaelf/postgres

By michaelf

•Updated about 11 years ago

Create a container with Postgres and a generic database

Image
0

847

michaelf/postgres repository overview

⁠Usage

This image is based on postgres:9.2. It creates a container with an empty database and a user with passowrd all of the same name. Initially this name is 'generic'.

You can easily change the name of the db and user by setting the env variable DB_NAME.

⁠Examples

⁠Sonarqube

Create a container with postgresdatabase named sonar docker run -d --name psql_sonar -e DB_NAME=sonar -p 12345:5432 michaelf/postgres

Link the sonar container to the forementioned container: docker run -d --link psql_sonar:db --name sonarqube -p 9000:9000 -e SONARQUBE_JDBC_URL=jdbc:postgresql://db/sonar sonarqube

Hint the link alias db is also in the /etc/hosts file so the URL with hostname db is always correct.

Tag summary
Recent tags
Content type
Image
Digest
sha256:3b2144e9c…
Size
78.1 MB
Last updated
about 11 years ago
docker pull michaelf/postgres:latest