postgres

arm32v7/postgres Docker 镜像

PostgreSQL对象关系型数据库系统提供可靠性和数据完整性。

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

注意: 此镜像的描述超出了Hub的25000字符长度限制,因此已被截断。完整描述可在https://github.com/docker-library/docs/tree/master/postgres/README.md查看。另请参阅https://github.com/docker/hub-feedback/issues/238和https://github.com/docker/roadmap/issues/475。**注意:** 这是https://hub.docker.com/_/postgres的`arm32v7`架构构建的“按架构”仓库——更多信息,请参见官方镜像文档中的“除amd64之外的架构?”https://github.com/docker-library/official-images#architectures-other-than-amd64和官方镜像FAQ中的“Git中镜像的源已更改,现在该怎么办?”https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what。

快速参考

-** 维护者:**https://github.com/docker-library/postgres

-** 获取帮助:**https://dockr.ly/comm-slack、Server Fault、https://unix.stackexchange.com/help/on-topic或https://stackoverflow.com/help/on-topic

支持的标签及对应的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/、https://hub.docker.com/r/arm32v5/postgres/、https://hub.docker.com/r/arm32v6/postgres/、https://hub.docker.com/r/arm32v7/postgres/、https://hub.docker.com/r/arm64v8/postgres/、https://hub.docker.com/r/i386/postgres/、https://hub.docker.com/r/mips64le/postgres/、https://hub.docker.com/r/ppc64le/postgres/、https://hub.docker.com/r/riscv64/postgres/、https://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?

PostgreSQL,通常简称为“Postgres”,是一个对象关系型数据库管理系统(ORDBMS),强调可扩展性和标准合规性。作为数据库服务器,其主要功能是安全地存储数据并支持最佳实践,随后根据其他软件应用程序的请求(无论是同一计算机上的应用程序还是网络上另一台计算机上运行的应用程序,包括互联网)检索数据。它可以处理从小型单机应用程序到具有许多并发用户的大型互联网应用程序的工作负载。最新版本还提供数据库本身的复制功能,以提高安全性和可扩展性。

PostgreSQL实现了SQL:2011标准的大部分内容,是ACID兼容的事务型数据库(包括大多数DDL语句),使用多版本并发控制(MVCC)避免锁定问题,提供对脏读的免疫和完全可串行化;使用许多其他数据库不具备的索引方法处理复杂SQL查询;具有可更新视图和物化视图、触发器、外键;支持函数和存储过程以及其他可扩展性,并有大量第三方编写的扩展。除了能够与主要的专有和开源数据库一起工作外,PostgreSQL通过其广泛的标准SQL支持和可用的迁移工具支持从这些数据库迁移。如果使用了专有扩展,通过其可扩展性,可以通过一些内置和第三方开源兼容性扩展(如Oracle兼容扩展)来模拟许多功能。

***.org/wiki/PostgreSQL

如何使用此镜像

启动postgres实例

console
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d arm32v7/postgres

默认的postgres用户和数据库在入口点通过initdb创建。

postgres数据库是一个默认数据库,供用户、实用程序和第三方应用程序使用。

https://www.postgresql.org/docs/14/app-initdb.html

... 或通过psql

console
$ 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)

... 通过https://github.com/docker/compose

postgres的compose.yaml示例:

yaml
# 使用postgres/example用户/密码凭据

services:

  db:
    image: docker.xuanyuan.run/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: docker.xuanyuan.run/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实例中的超级用户密码,由初始容器启动

镜像拉取方式

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

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

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

DockerHub 原生拉取命令

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