QuickStart系列:docker部署之PostgreSQL
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 将容器端口映射到宿主机端口 前面的宿主机的端口 后面的是容器内部端口
如密码是123456
相关文档说明:
官网简介 https://www.postgresql.org/
镜像说明 https://dashboard.daocloud.io/packages/4437b11b-98f8-4650-bf56-ae5eeeb36c5a
官方镜像说明:https://hub.docker.com/_/postgres/
最新文章
- Oracle 中的sql函数以及分页
- Windows Server2008 下用于.NET Framework3.0版本的问题无法在IIS7中配置.NET Framework4.0节点的问题
- sublime 相关配置
- PHPExcel按单元格读取数据
- IOS第三天-新浪微博 - 版本新特性,OAuth授权认证
- 如何用 fiddler 调试线上代码
- struct大小
- C# 实现Oracle中的数据与Excel之间的转换
- RSA加密算法正确性证明
- Android 编程下 Activity 的创建和应用退出时的销毁
- ICE
- 根据Mob官网的天气预报接口写了一个简单的demo
- IPC- Posix与system v
- Url校验正则
- Cookies 和session
- Lintcode85-Insert Node in a Binary Search Tree-Easy
- elasticsearch 摘要
- C++ MFC棋牌类小游戏day2
- c# 操作文本文件
- Win10开发环境配置