Install postgresal with docker

Intall postgresql with docker in China

    • [1.Show the images of docker](#1.Show the images of docker)
    • [2.Create the image of postgresql](#2.Create the image of postgresql)
    • [3.Connect the database in container](#3.Connect the database in container)
    • [4.Connect the postgre with remote tool](#4.Connect the postgre with remote tool)

1.Show the images of docker

shell 复制代码
docker ps


Attention:

If you do not choose the version, docker will pull the latest version application!

shell 复制代码
docker pull postgres

2.Create the image of postgresql

shell 复制代码
docker run -it \
--name postgres \
--privileged \
-e POSTGRES_PASSWORD=demo \
-p 5432:5432 \
-v /usr/local/software/postgres/data:/var/lib/postgresql/data \
-d postgres

3.Connect the database in container

shell 复制代码
docker exec -it postgres /bin/bash

4.Connect the postgre with remote tool

We choose the DBeaver to connect the postgreSql.

we already connected the database.

相关推荐
久曲健的测试窝5 分钟前
Jenkins Share Library教程 —— 开发入门
运维·servlet·jenkins
三坛海会大神55526 分钟前
k8s(六)Pod的资源控制器
云原生·容器·kubernetes
缘的猿1 小时前
Docker 与 K8s 网络模型全解析
docker·容器·kubernetes
游戏开发爱好者81 小时前
FTP 抓包分析实战,命令、被动主动模式要点、FTPS 与 SFTP 区别及真机取证流程
运维·服务器·网络·ios·小程序·uni-app·iphone
默 语1 小时前
AI驱动软件测试全流程自动化:从理论到实践的深度探索
运维·人工智能·驱动开发·ai·自动化·ai技术·测试全流程
运维栈记2 小时前
使用Grafana监控K8S中的异常Pod
docker·kubernetes·grafana
荣光波比2 小时前
K8S(十二)—— Kubernetes安全机制深度解析与实践:从认证到RBAC授权
安全·容器·kubernetes
liming4952 小时前
k8s 安装 kuboardV3 报错
云原生·容器·kubernetes
望获linux2 小时前
【实时Linux实战系列】实时 Linux 的自动化基准测试框架
java·大数据·linux·运维·网络·elasticsearch·搜索引擎
ajax_beijing2 小时前
k8s的ReplicaSet介绍
运维·云原生