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.

相关推荐
wanhengidc32 分钟前
流量清洗的作用是什么?
运维·服务器·网络·安全·web安全·智能手机
全栈工程师修炼指南41 分钟前
Nginx | 磁盘IO层面性能优化秘诀:error 日志内存环形缓冲区及小文件 sendfile 零拷贝技术
运维·网络·nginx·性能优化
@LuckY BoY43 分钟前
Linux Mint 上开启 VNC 远程桌面
linux·运维·服务器
ywgcsxue1 小时前
在麒麟V10上源码编译安装Nginx
linux·运维·服务器·nginx
Warren981 小时前
Windows本地部署n8n完整教程(基于Docker,新手友好)
运维·windows·python·测试工具·docker·容器·可用性测试
somi71 小时前
ARM-05-Platform + DTS + GPIO子系统 + 中断 + 等待队列 + 错误处理
linux·运维·arm开发
T0uken2 小时前
【Linux】耗时任务执行并邮件通知
linux·运维·服务器
Yolo566Q2 小时前
从机理到实践告别“黑箱”模拟:OpenGeoSys(OGS6)多物理场THMC 全耦合建模与Python自动化分析
运维·自动化
网络安全许木2 小时前
自学渗透测试第16天(Linux文本处理进阶)
linux·运维·服务器·网络安全·渗透测试
铅笔小新z3 小时前
【Linux】进程控制(下)
linux·运维·chrome