Docker安装PostgreSQL

dockerhub网址

https://www.docker.com/

https://hub.docker.com/

在这里插入图片描述
在这里插入图片描述

What is PostgreSQL?

PostgreSQL, often simply “Postgres”, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. As a database server, its primary function is to store data, securely and supporting best practices, and retrieve it later, as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). It can handle workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. Recent versions also provide replication of the database itself for security and scalability.
PostgreSQL 通常简称为 “Postgres”,是一种对象关系数据库管理系统(ORDBMS),强调可扩展性和符合标准。作为数据库服务器,它的主要功能是安全地存储数据并支持最佳实践,然后根据其他软件应用程序(无论是同一台计算机上的应用程序还是在网络(包括互联网)上另一台计算机上运行的应用程序)的要求检索数据。它可以处理从小型单机应用程序到拥有众多并发用户的大型互联网应用程序等各种工作负载。最新版本还提供了数据库本身的复制功能,以提高安全性和可扩展性。
PostgreSQL implements the majority of the SQL:2011 standard, is ACID-compliant and transactional (including most DDL statements) avoiding locking issues using multiversion concurrency control (MVCC), provides immunity to dirty reads and full serializability; handles complex SQL queries using many indexing methods that are not available in other databases; has updateable views and materialized views, triggers, foreign keys; supports functions and stored procedures, and other expandability, and has a large number of extensions written by third parties. In addition to the possibility of working with the major proprietary and open source databases, PostgreSQL supports migration from them, by its extensive standard SQL support and available migration tools. And if proprietary extensions had been used, by its extensibility that can emulate many through some built-in and third-party open source compatibility extensions, such as for Oracle.
PostgreSQL执行了SQL:2011标准的大部分内容,符合ACID标准并具有事务性(包括大多数DDL语句),可使用多版本并发控制(MVCC)避免锁定问题,提供对脏读取的免疫力和完全的序列化能力;使用其他数据库所不具备的多种索引方法处理复杂的SQL查询;具有可更新视图和物化视图、触发器、外键;支持函数和存储过程以及其他可扩展性,并拥有大量由第三方编写的扩展程序。除了可以与主要的专有数据库和开放源码数据库一起使用外,PostgreSQL 还支持从这些数据库迁移,因为它支持大量标准 SQL 语句,并有可用的迁移工具。如果使用了专有扩展,PostgreSQL 的可扩展性可以通过一些内置和第三方开源兼容扩展(如 Oracle)来模拟许多扩展。

下载PostgreSQL

docker pull postgres:12.17

在这里插入图片描述

创建映射路径

mkdir -p /data/postgres/postgresql/data

启动容器

docker run --name postgres1217 -e POSTGRES_PASSWORD=PGdata@456  -p 5432:5432 -v /data/postgres/postgresql/data:/var/lib/postgresql/data -d postgres:12.17

命令解释
docker run # 创建容器
–name postgres # 设置容器名
-e POSTGRES_PASSWORD=PGdata@456 # 设置密码
-p 5432:5432 # 设置访问端口
-v /data/postgres/postgresql/data:/var/lib/postgresql/data # 将容器中的数据挂载到本地
-d postgres:12.17 #选择镜像

密码:PGdata@456

在这里插入图片描述

在这里插入图片描述

相关推荐

  1. Docker安装Postgresql12

    2024-05-12 01:08:02       49 阅读
  2. Docker 安装PostgreSQL容器

    2024-05-12 01:08:02       34 阅读
  3. Docker安装PostgreSQL

    2024-05-12 01:08:02       44 阅读
  4. Docker安装PostgreSQL

    2024-05-12 01:08:02       36 阅读
  5. Docker 安装 PostgreSQL

    2024-05-12 01:08:02       31 阅读
  6. Docker环境安装Postgresql数据库Posrgresql 15.6

    2024-05-12 01:08:02       28 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-12 01:08:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-12 01:08:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-12 01:08:02       87 阅读
  4. Python语言-面向对象

    2024-05-12 01:08:02       96 阅读

热门阅读

  1. 简站WordPress主题

    2024-05-12 01:08:02       39 阅读
  2. QT 设置窗口不透明度

    2024-05-12 01:08:02       35 阅读
  3. 算法提高之魔板

    2024-05-12 01:08:02       23 阅读
  4. 解决GB28181网络抖动问题

    2024-05-12 01:08:02       27 阅读
  5. GNU/Linux - 如何确定当前安装的Linux内核版本

    2024-05-12 01:08:02       30 阅读
  6. 超大文件去除重复数据

    2024-05-12 01:08:02       30 阅读
  7. linux查看后台运行程序

    2024-05-12 01:08:02       32 阅读
  8. flask 模拟简单的登录功能(1)

    2024-05-12 01:08:02       34 阅读
  9. Kotlin协程中调度器Dispatchers的介绍

    2024-05-12 01:08:02       39 阅读
  10. android 蓝牙技术 学习记录

    2024-05-12 01:08:02       36 阅读