Sign inSign up

scalingo/postgresql

By scalingo

•Updated 5 days ago

Image of the PostgreSQL instances of Scalingo PaaS

Image
Databases & storage
1

10K+

scalingo/postgresql repository overview

⁠Running the image

This image contains PostgreSQL as offered by Scalingo. To start the image, you can run the following snippet:

docker run -it -p 5432:5432 \
           -v <DATA_DIRECTORY>:/var/lib/postgresql \
           scalingo/postgresql:latest /postgresql

Your database is now up and running on the port 5432 of your host. You can connect to it with the command:

psql "postgres://postgresql:secret@localhost:5432/postgresql"

Or with the admin account:

psql "postgres://admin:admin-secret@localhost:5432/postgresql"

⁠Parameters

  • <DATA_DIRECTORY>: directory used to store database data.

⁠Environment

  • DB_USER (Optional, default: postgresql): username used for database authentication.
  • DB_PASSWORD (Optional, default: secret): password used for database authentication.
  • DB_ADMIN_PASSWORD (Optional: default: admin-secret): password used for the admin account.
  • DB_MEMORY (Optional, default: 512): database memory size in megabytes.
  • DB_UID (Optional, default: 1505): user UID that PostgreSQL should use to store data and run itself. You can set it to your own UID to have a simpler dev environment. Just add -e DB_UID=$(id -u) before the -v flag.

⁠Permissions

A database with the same name as $DB_USER will be created, the user $DB_USER will be available to connect to it.

The admin user is named admin and can access any database with the password defined in $DB_ADMIN_PASSWORD and create new databases also.

Tag summary

Content type

Image

Digest

sha256:f6cb27ed5…

Size

363.6 MB

Last updated

5 days ago

docker pull scalingo/postgresql:18.6.0-2