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),強(qiáng)調(diào)可擴(kuò)展性和符合標(biāo)準(zhǔn)。作為數(shù)據(jù)庫服務(wù)器,它的主要功能是安全地存儲數(shù)據(jù)并支持最佳實踐,然后根據(jù)其他軟件應(yīng)用程序(無論是同一臺計算機(jī)上的應(yīng)用程序還是在網(wǎng)絡(luò)(包括互聯(lián)網(wǎng))上另一臺計算機(jī)上運行的應(yīng)用程序)的要求檢索數(shù)據(jù)。它可以處理從小型單機(jī)應(yīng)用程序到擁有眾多并發(fā)用戶的大型互聯(lián)網(wǎng)應(yīng)用程序等各種工作負(fù)載。最新版本還提供了數(shù)據(jù)庫本身的復(fù)制功能,以提高安全性和可擴(kuò)展性。
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ù)和存儲過程以及其他可擴(kuò)展性,并擁有大量由第三方編寫的擴(kuò)展程序。除了可以與主要的專有數(shù)據(jù)庫和開放源碼數(shù)據(jù)庫一起使用外,PostgreSQL 還支持從這些數(shù)據(jù)庫遷移,因為它支持大量標(biāo)準(zhǔn) SQL 語句,并有可用的遷移工具。如果使用了專有擴(kuò)展,PostgreSQL 的可擴(kuò)展性可以通過一些內(nèi)置和第三方開源兼容擴(kuò)展(如 Oracle)來模擬許多擴(kuò)展。
下載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)文章
Gogs+Jenkins+Docker 自動化部署.NetCore的方法步驟
這篇文章主要介紹了Gogs+Jenkins+Docker 自動化部署.NetCore,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-06-06Docker?cp命令詳解之如何在Docker容器和主機(jī)之間復(fù)制文件/文件夾
要從Docker容器中復(fù)制文件,可以使用docker?cp命令,下面這篇文章主要給大家介紹了關(guān)于Docker?cp命令詳解之如何在Docker容器和主機(jī)之間復(fù)制文件/文件夾的相關(guān)資料,文中通過圖文介紹的非常詳細(xì),需要的朋友可以參考下2024-07-07修改Docker容器內(nèi)文件的三種實現(xiàn)方式
這篇文章主要介紹了修改Docker容器內(nèi)文件的三種實現(xiàn)方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-08-08利用Docker搭建本地https環(huán)境的完整步驟
這篇文章主要給大家介紹了關(guān)于如何利用Docker搭建本地https環(huán)境的完整步驟,文中通過示例代碼將實現(xiàn)的步驟介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2018-04-04Docker構(gòu)建簡單的個人主頁網(wǎng)站實戰(zhàn)教程
Docker是一種開源容器化技術(shù),可以打包、發(fā)布和運行應(yīng)用程序,本教程介紹了如何使用Docker構(gòu)建一個簡單的個人主頁網(wǎng)站,通過編寫Dockerfile來自定義鏡像,并展示了如何通過傳入環(huán)境變量來動態(tài)更改網(wǎng)頁內(nèi)容,項目使用的技術(shù)包括Docker、Alpine、Nginx、HTML、CSS和JavaScript2024-10-10docker環(huán)境調(diào)用mysqldump進(jìn)行數(shù)據(jù)備份方式
這篇文章主要介紹了docker環(huán)境調(diào)用mysqldump進(jìn)行數(shù)據(jù)備份方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2025-06-06如何批量刪除Docker中已經(jīng)停止的容器的幾種方法
本文主要介紹了批量刪除Docker中已經(jīng)停止的容器的幾種方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-05-05