postgres

ubuntu/postgres Docker Image

PostgreSQL是一款开源的对象关系型数据库,它功能强大、稳定性高,广泛应用于各类企业级应用和数据管理场景,支持复杂查询、事务处理及高级数据类型,其长期版本由Canonical负责维护,为用户提供持续的技术支持与更新服务,确保数据库系统在长期使用中的可靠性与安全性,是全球众多开发者和企业信赖的主流数据库解决方案之一。

46 次收藏下载次数: 0状态:社区镜像维护者:Ubuntu 官方镜像仓库类型:镜像最近更新:
下载命令
点击查看

ubuntu/postgres is a rock for postgres maintained by https://canonical.com/.

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.

\https://www.postgresql.org/\]

Tags and Architectures

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

TagsSupported untilVersionBaseArchitectures
14-22.04_beta
aliases14-22.04_edge, edge, latest
-1422.04s390x, amd64, ppc64le, arm64
13-21.10_beta
aliases13-21.10_edge
-1321.10amd64, s390x, arm64, ppc64le
13-21.04_beta
aliases13-21.04_edge
-1321.04s390x, ppc64le, amd64, arm64
12-20.04_beta
aliases12-20.04_edge
-1220.04s390x, arm64, ppc64le, amd64
18-26.04_edge
aliases18-26.04_edge
04/20311826.04arm64, amd64
16-24.04_edge
aliases16-24.04_edge
04/20291624.04amd64, arm64

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.

\https://documentation.ubuntu.com/pebble/\]

Inspect

To view the https://documentation.ubuntu.com/rockcraft/en/latest/reference/rockcraft-yaml/#services and https://documentation.ubuntu.com/rockcraft/latest/reference/rockcraft-yaml/#checks defined in this rock:

sh
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:

sh
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:

sh
docker exec postgres-container pebble logs

Or, for a specific service:

sh
docker exec postgres-container pebble logs <service>

Monitor health checks

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

sh
docker exec postgres-container pebble checks

The overall health of your container can be inspected via:

sh
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

\https://github.com/canonical/postgresql-rock/issues\] \https://github.com/canonical/postgresql-rock\]

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 https://canonical.com/legal/intellectual-property-policy.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 postgres 镜像标签

docker pull docker.xuanyuan.run/ubuntu/postgres:<标签>

DockerHub 原生拉取命令

docker pull ubuntu/postgres:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告