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.

相关推荐
刚入门的大一新生2 小时前
Linux-Linux的基础指令4
linux·运维·服务器
腾讯蓝鲸智云5 小时前
嘉为蓝鲸可观测系列产品入选Gartner《中国智能IT监控与日志分析工具市场指南》
运维·人工智能·信息可视化·自动化
能不能别报错6 小时前
openclaw-linux部署教程+mimo-v2-pro
linux·运维·服务器
小虎卫远程打卡app8 小时前
光通信与视频编码前沿技术综述:从超大容量传输到实时神经网络编码
运维·网络·信息与通信·视频编解码
ToB营销学堂8 小时前
B2B营销自动化新解法:MarketUP聚焦高转化场景
大数据·运维·自动化
TK云大师-KK8 小时前
TikTok自动化直播遇到内容重复问题?这套技术方案了解一下
大数据·运维·人工智能·矩阵·自动化·新媒体运营·流量运营
蓝羽天空8 小时前
Ubuntu 24.04 安装 Docker
linux·ubuntu·docker
T0uken8 小时前
WSL:离线配置 Ubuntu 开发环境
linux·运维·ubuntu
暮秋4748 小时前
ubuntu部署阿里通义千问模型
运维·ubuntu·大模型
维度攻城狮8 小时前
Docker-Ubuntu安装并启动Chrome浏览器
chrome·ubuntu·docker·安装