mysql --> mariadb --> postgresql 

官网简介 https://www.postgresql.org/

 

使用的镜像名称 centos/postgresql-96-centos7

拉取镜像 centos/postgresql-96-centos7:9.6

镜像地址: index.docker.io/centos/postgresql-96-centos7 当前版本9.6

来源(镜像来源以及说明):https://dashboard.daocloud.io/packages/4437b11b-98f8-4650-bf56-ae5eeeb36c5a

执行命令

docker run -d --name postgresql_database -e  POSTGRESQL_ADMIN_PASSWORD=123456 -v /opt/data/postgresql:/var/lib/pgsql/data -p 5432:5432 centos/postgresql-96-centos7:9.6

说明:管理员数据库postgres 管理员用户名 postgres

postgresql_database容器命名

POSTGRESQL_ADMIN_PASSWORD 管理员密码

/opt/data/postgresql宿主机存放数据库的目录 将容器内数据库目录映射到宿主机 使用存储卷 便于持久化

centos/postgresql-96-centos7:9.6是 镜像名称和版本

-p 5432:5432 将容器端口映射到宿主机端口 前面的宿主机的端口 后面的是容器内部端口 

QuickStart系列:docker部署之PostgreSQL如密码是123456

相关文档说明:

官网简介 https://www.postgresql.org/

镜像说明 https://dashboard.daocloud.io/packages/4437b11b-98f8-4650-bf56-ae5eeeb36c5a

官方镜像说明:https://hub.docker.com/_/postgres/

 

相关文章:

  • 2021-08-31
  • 2021-12-11
  • 2021-12-13
  • 2021-10-20
  • 2021-10-21
  • 2022-12-23
  • 2022-01-06
  • 2021-09-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-01-15
  • 2022-12-23
  • 2021-10-20
相关资源
相似解决方案