注意: 此镜像的描述超出了Hub的25000字符限制,已被截断。完整描述可在https://github.com/docker-library/docs/tree/master/postgres/README.md%E6%9F%A5%E7%9C%8B%E3%80%82%E5%8F%A6%E8%AF%B7%E5%8F%82%E9%98%85https://github.com/docker/hub-feedback/issues/238%E5%92%8Chttps://github.com/docker/roadmap/issues/475%E3%80%82
注意: 这是https://hub.docker.com/_/postgres%E7%9A%84%60s390x%60%E6%9E%B6%E6%9E%84%E4%B8%93%E7%94%A8%E4%BB%93%E5%BA%93%E2%80%94%E2%80%94%E6%9B%B4%E5%A4%9A%E4%BF%A1%E6%81%AF%EF%BC%8C%E8%AF%B7%E5%8F%82%E9%98%85%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8F%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%E2%80%9Chttps://github.com/docker-library/official-images#architectures-other-than-amd64%E2%80%9D%E5%92%8C%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8FFAQ%E4%B8%AD%E7%9A%84%E2%80%9Chttps://github.com/docker-library/faq#an-images-source-changed-in-git-now-what%E2%80%9D%E3%80%82
维护者:
https://github.com/docker-library/postgres
获取帮助:
Docker社区Slack、Server Fault、Unix & Linux或Stack Overflow
Dockerfile链接https://github.com/docker-library/postgres/blob/22ca5c8d8e4b37bece4d38dbce1a060583b5308a/18/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/22ca5c8d8e4b37bece4d38dbce1a060583b5308a/18/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/18/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/18/alpine3.21/Dockerfile
https://github.com/docker-library/postgres/blob/87e6f65859a53d10c5170a587def1bfc882d3830/17/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/87e6f65859a53d10c5170a587def1bfc882d3830/17/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/17/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/17/alpine3.21/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/16/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/16/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/16/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/16/alpine3.21/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/15/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/15/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/15/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/15/alpine3.21/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/14/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/14/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/14/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/14/alpine3.21/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/13/trixie/Dockerfile
https://github.com/docker-library/postgres/blob/a2433755c76d294477c85945d68944f8cdb7cf4b/13/bookworm/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/13/alpine3.22/Dockerfile
https://github.com/docker-library/postgres/blob/2c751341b6454412f2048de021a1f***de/13/alpine3.21/Dockerfile
问题反馈地址:
https://github.com/docker-library/postgres/issues?q=
支持的架构: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
https://hub.docker.com/r/amd64/postgres/%E3%80%81https://hub.docker.com/r/arm32v5/postgres/%E3%80%81https://hub.docker.com/r/arm32v6/postgres/%E3%80%81https://hub.docker.com/r/arm32v7/postgres/%E3%80%81https://hub.docker.com/r/arm64v8/postgres/%E3%80%81https://hub.docker.com/r/i386/postgres/%E3%80%81https://hub.docker.com/r/mips64le/postgres/%E3%80%81https://hub.docker.com/r/ppc64le/postgres/%E3%80%81https://hub.docker.com/r/riscv64/postgres/%E3%80%81https://hub.docker.com/r/s390x/postgres/
镜像制品详情:
https://github.com/docker-library/repo-info/blob/master/repos/postgres (https://github.com/docker-library/repo-info/commits/master/repos/postgres)
(镜像元数据、传输大小等)
镜像更新:
https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fpostgres
https://github.com/docker-library/official-images/blob/master/library/postgres (https://github.com/docker-library/official-images/commits/master/library/postgres)
本描述的来源:
https://github.com/docker-library/docs/tree/master/postgres (https://github.com/docker-library/docs/commits/master/postgres)
PostgreSQL,通常简称为“Postgres”,是一个对象关系型数据库管理系统(ORDBMS),强调可扩展性和标准合规性。作为数据库服务器,其主要功能是安全地存储数据并支持最佳实践,随后根据其他软件应用的请求检索数据,这些应用程序可以在同一台计算机上运行,也可以在网络(包括互联网)上的另一台计算机上运行。它可以处理从小型单机应用到具有大量并发用户的大型互联网应用的各种工作负载。最新版本还提供数据库本身的复制功能,以增强安全性和可扩展性。
PostgreSQL实现了大部分SQL:2011标准,符合ACID特性且支持事务(包括大多数DDL语句),通过多版本并发控制(MVCC)避免锁定问题,提供脏读免疫和完全可串行化;使用许多其他数据库不具备的索引方法处理复杂SQL查询;支持可更新视图和物化视图、触发器、外键;支持函数和存储过程以及其他扩展功能,并有大量第三方编写的扩展。除了能够与主要的专有和开源数据库协作外,PostgreSQL还通过其广泛的标准SQL支持和可用的迁移工具支持从这些数据库迁移。如果使用了专有扩展,其可扩展性可以通过一些内置和第三方开源兼容性扩展(如Oracle兼容扩展)来模拟许多专有功能。
***.org/wiki/PostgreSQL
!https://raw.githubusercontent.com/docker-library/docs/01c***b2fe592c1f93a13b4e289ada0e3a1/postgres/logo.png
console$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d s390x/postgres
默认的postgres用户和数据库在入口点通过initdb创建。
postgres数据库是一个默认数据库,供用户、工具和第三方应用程序使用。
postgresql.org/docs
psqlconsole$ docker run -it --rm --network some-network s390x/postgres psql -h some-postgres -U postgres psql (14.3) Type "help" for help. postgres=# SELECT 1; ?column? ---------- 1 (1 row)
postgres的compose.yaml示例:
yaml# 使用postgres/example用户/密码凭据 services: db: image: postgres restart: always # 使用docker compose时设置共享内存限制 shm_size: 128mb # 或通过swarm stack部署时设置共享内存限制 #volumes: # - type: tmpfs # target: /dev/shm # tmpfs: # size: 134217728 # 128*2^20字节 = 128Mb environment: POSTGRES_PASSWORD: example adminer: image: adminer restart: always ports: - 8080:8080
运行docker compose up,等待其完全初始化,然后访问http://localhost:8080或http://host-ip:8080(视情况而定)。
有多种方式可以扩展postgres镜像。这里不尝试支持所有可能的用例,仅介绍一些我们认为有用的方法。
PostgreSQL镜像使用多个容易被忽略的环境变量。唯一必需的变量是POSTGRES_PASSWORD,其余为可选。
警告: 仅当您使用空数据目录启动容器时,Docker特定变量才会生效;容器启动时,任何预先存在的数据库都将保持不变。
POSTGRES_PASSWORD此环境变量是使用PostgreSQL镜像所必需的。它不能为空或未定义。此环境变量设置PostgreSQL的超级用户密码。默认超级用户由POSTGRES_USER环境变量定义。
注意1: PostgreSQL镜像在本地设置了trust身份验证,因此您可能会注意到从localhost(在同一容器内)连接时不需要密码。但是,如果从不同的主机/容器连接,则需要密码。
注意2: 此变量定义PostgreSQL实例中的超级用户密码,由初始容器启动期间的initdb脚本设置。它对运行时psql客户端可能使用的PGPASSWORD环境变量没有影响,如[[]]([]
以下是 s390x/postgres 相关的常用 Docker 镜像,适用于 关系型数据库、复杂查询、数据完整性 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。


探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务