Docker如何安裝PostgreSQL
dockerhub網(wǎng)址


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”,是一種對象關(guān)系數(shù)據(jù)庫管理系統(tǒng)(ORDBMS),強調(diào)可擴展性和符合標(biāo)準(zhǔn)。作為數(shù)據(jù)庫服務(wù)器,它的主要功能是安全地存儲數(shù)據(jù)并支持最佳實踐,然后根據(jù)其他軟件應(yīng)用程序(無論是同一臺計算機上的應(yīng)用程序還是在網(wǎng)絡(luò)(包括互聯(lián)網(wǎng))上另一臺計算機上運行的應(yīng)用程序)的要求檢索數(shù)據(jù)。它可以處理從小型單機應(yīng)用程序到擁有眾多并發(fā)用戶的大型互聯(lián)網(wǎng)應(yīng)用程序等各種工作負(fù)載。最新版本還提供了數(shù)據(jù)庫本身的復(fù)制功能,以提高安全性和可擴展性。
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執(zhí)行了SQL:2011標(biāo)準(zhǔn)的大部分內(nèi)容,符合ACID標(biāo)準(zhǔn)并具有事務(wù)性(包括大多數(shù)DDL語句),可使用多版本并發(fā)控制(MVCC)避免鎖定問題,提供對臟讀取的免疫力和完全的序列化能力;使用其他數(shù)據(jù)庫所不具備的多種索引方法處理復(fù)雜的SQL查詢;具有可更新視圖和物化視圖、觸發(fā)器、外鍵;支持函數(shù)和存儲過程以及其他可擴展性,并擁有大量由第三方編寫的擴展程序。除了可以與主要的專有數(shù)據(jù)庫和開放源碼數(shù)據(jù)庫一起使用外,PostgreSQL 還支持從這些數(shù)據(jù)庫遷移,因為它支持大量標(biāo)準(zhǔn) SQL 語句,并有可用的遷移工具。如果使用了專有擴展,PostgreSQL 的可擴展性可以通過一些內(nèi)置和第三方開源兼容擴展(如 Oracle)來模擬許多擴展。
下載PostgreSQL
docker pull postgres:12.17

創(chuàng)建映射路徑
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 # 創(chuàng)建容器
–name postgres # 設(shè)置容器名
-e POSTGRES_PASSWORD=PGdata@456 # 設(shè)置密碼
-p 5432:5432 # 設(shè)置訪問端口
-v /data/postgres/postgresql/data:/var/lib/postgresql/data # 將容器中的數(shù)據(jù)掛載到本地
-d postgres:12.17 #選擇鏡像
密碼:PGdata@456


到此這篇關(guān)于Docker如何安裝PostgreSQL的文章就介紹到這了,更多相關(guān)Docker安裝PostgreSQL內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- 在 Docker 中安裝和運行 PostgreSQL的詳細(xì)步驟
- docker安裝Postgresql數(shù)據(jù)庫及基本操作
- Docker Compose安裝部署PostgreSQL數(shù)據(jù)庫的實現(xiàn)步驟
- Docker安裝PostgreSQL數(shù)據(jù)庫的詳細(xì)步驟
- docker如何安裝帶postgis插件的postgresql數(shù)據(jù)庫
- docker安裝postgresql的圖文教程
- docker安裝并持久化postgresql數(shù)據(jù)庫的操作步驟
- Docker27.3.1中安裝 PostgreSQL16的實現(xiàn)步驟
相關(guān)文章
ubuntu系統(tǒng)中無法拉取docker鏡像的問題及解決
作者遇到的docker拉取mysql8.0鏡像失敗的問題,通過更換鏡像加速器、更新配置、診斷DNS解析問題等步驟,最終成功使用DaoCloud鏡像站拉取鏡像,作者分享了解決問題的過程和經(jīng)驗,對遇到類似問題的人會有幫助2026-04-04
深入理解 Docker 數(shù)據(jù)卷(Data Volume)
本文詳細(xì)介紹了Docker數(shù)據(jù)卷(DataVolume)的概念、作用、使用命令、掛載方式以及最佳實踐,數(shù)據(jù)卷是Docker中實現(xiàn)數(shù)據(jù)持久化和共享的關(guān)鍵機制之一,通過本文的學(xué)習(xí),讀者可以更好地掌握數(shù)據(jù)卷的使用方法,從而在容器化應(yīng)用中進(jìn)行有效的數(shù)據(jù)管理2024-11-11
Docker部署Laravel應(yīng)用的實現(xiàn)示例
這篇文章主要介紹了Docker部署Laravel應(yīng)用的實現(xiàn)示例,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-09-09
dockerfile部署前端vue打包的ist文件實戰(zhàn)
這篇文章主要為大家介紹了dockerfile部署前端vue打包的ist文件實戰(zhàn),有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-10-10
Docker 使用nsenter工具進(jìn)入容器的操作
這篇文章主要介紹了Docker 使用nsenter工具進(jìn)入容器的操作,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-11-11

