VOOZH about

URL: https://hub.docker.com/r/ubuntu/postgres

⇱ ubuntu/postgres - Docker Image


ubuntu/postgres

Verified Publisher

By Canonical

Updated 2 days ago

PostgreSQL is an open source object-relational database. Long-term versions maintained by Canonical.

Image
Databases & storage
45

500K+

ubuntu/postgres repository overview

ubuntu/postgres is a rock for postgres maintained by Canonical.

PostgreSQL is a powerful, open source object-relational database system. It has more than 20 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.

[Learn more about postgres]

Tags and Architectures

NOTE: These tags follow a specific naming convention that respects the concept of channels.

TagsSupported untilVersionBaseArchitectures
14-22.04_beta-1422.04s390x, amd64, ppc64le, arm64
13-21.10_beta-1321.10amd64, s390x, arm64, ppc64le
13-21.04_beta-1321.04s390x, ppc64le, amd64, arm64
12-20.04_beta-1220.04s390x, arm64, ppc64le, amd64
16-24.04_edge04/20291624.04arm64, amd64

Get started

This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.

[Learn more about Pebble]

Inspect

To view the Pebble services and checks defined in this rock:

docker run --rm ubuntu/postgres:14-22.04_beta plan
Run

To run this rock, use any of the usual container runtimes, for example, docker:

docker run --name postgres-container \
 -d -e TZ=UTC -e POSTGRES_PASSWORD=My:S3cr3t -p 30432:5432 \
 ubuntu/postgres:14-22.04_beta

Access your PostgreSQL server at localhost:30432.

Get logs

To view the logs of the running container, run:

docker exec postgres-container pebble logs

Or, for a specific service:

docker exec postgres-container pebble logs <service>
Monitor health checks

Rocks may have predefined health checks that you can list by running:

docker exec postgres-container pebble checks

The overall health of your container can be inspected via:

docker exec postgres-container pebble health

Configuration

Environment variables
OptionDescriptionDefault
TZTimezone.UTC
POSTGRES_PASSWORDSet the password for the superuser (postgres by default). This option is mandatory and must not be empty. Required to connect from external hosts, e.g., my_secret_password.None
POSTGRES_USERCreate a new user with superuser privileges, e.g., john. Used in conjunction with POSTGRES_PASSWORD.None
POSTGRES_DBSet the name of the default database, e.g., db_test.None
POSTGRES_INITDB_ARGSPass arguments to the postgres initdb call, e.g., --data-checksums.None
POSTGRES_INITDB_WALDIRSet the location of the Postgres transaction log. By default it is stored in a subdirectory of the main Postgres data folder (PGDATA).None
POSTGRES_HOST_AUTH_METHODSet the auth-method for host connections for all databases, all users, and all addresses. The following will be added to the pg_hba.conf if this option is passed 'host all all all $POSTGRES_HOST_AUTH_METHOD'.None
PGDATASet the location of the database files./var/lib/postgresql/data
Volumes
OptionDescriptionDefault
-v <path>:/etc/postgresql/postgresql.confLocal configuration file postgresql.conf.None
-v <path>:/var/lib/postgresql/dataPersist data instead of initializing a new database every time you launch a new container.None
Ports
OptionDescriptionDefault
-p <port>:5432Expose the container's port 5432 on the host's <port>.None

[Report a bug] [Contribute]

Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with Canonical’s IP Policy.

Tag summary

16-24.04_edge

Content type

Image

Digest

sha256:11332e87f…

Size

199.8 MB

Last updated

2 days ago

docker pull ubuntu/postgres:16-24.04_edge

This week's pulls

Pulls:

3,441

Jun 15 to Jun 21