如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
注意: 此镜像的描述超出了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**%E6%B3%A8%E6%84%8F%EF%BC%9A** 这是https://hub.docker.com/_/postgres%E7%9A%84%60arm32v7%60%E6%9E%B6%E6%9E%84%E6%9E%84%E5%BB%BA%E7%9A%84%E2%80%9C%E6%8C%89%E6%9E%B6%E6%9E%84%E2%80%9D%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%E8%A7%81%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%9C%E9%99%A4amd64%E4%B9%8B%E5%A4%96%E7%9A%84%E6%9E%B6%E6%9E%84%EF%BC%9F%E2%80%9Dhttps://github.com/docker-library/official-images#architectures-other-than-amd64%E5%92%8C%E5%AE%98%E6%96%B9%E9%95%9C%E5%83%8FFAQ%E4%B8%AD%E7%9A%84%E2%80%9CGit%E4%B8%AD%E9%95%9C%E5%83%8F%E7%9A%84%E6%BA%90%E5%B7%B2%E6%9B%B4%E6%94%B9%EF%BC%8C%E7%8E%B0%E5%9C%A8%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F%E2%80%9Dhttps://github.com/docker-library/faq#an-images-source-changed-in-git-now-what%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%EF%BC%88https://github.com/docker-library/repo-info/commits/master/repos/postgres%EF%BC%89
(镜像元数据、传输大小等)
-** 镜像更新:**https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fpostgres
https://github.com/docker-library/official-images/blob/master/library/postgres%EF%BC%88https://github.com/docker-library/official-images/commits/master/library/postgres%EF%BC%89
-** 本描述的来源:**https://github.com/docker-library/docs/tree/master/postgres%EF%BC%88https://github.com/docker-library/docs/commits/master/postgres%EF%BC%89
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 arm32v7/postgres
默认的postgres用户和数据库在入口点通过initdb创建。
postgres数据库是一个默认数据库,供用户、实用程序和第三方应用程序使用。
postgresql.org/docs
psqlconsole$ docker run -it --rm --network some-network arm32v7/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实例中的超级用户密码,由初始容器启动
以下是 arm32v7/postgres 相关的常用 Docker 镜像,适用于 关系型数据库、复杂查询、数据完整性 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。


来自真实用户的反馈,见证轩辕镜像的优质服务