Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker install postgreSQL 11.4

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. Installation

Command: docker pull postgres:11.4

II. Operation

Command: docker run --name postgres_demo -e POSTGRES_PASSWORD=password -p 54321:5432 -d postgres:11.4

View containers after command execution:

Explanation:

run: Create and run a container;

--name: Specifies the name of the container created;

-e POSTGRES_PASSWORD=password: Sets the environment variable, specifying the login password for the database as password;

-p 54321:5432: port mapping maps port 5432 of the container to port 54321 of the external machine;

-d postgres:11.4: Specifies to use postgres:11.4 as a mirror.

Note:

postgres mirror default username is postgres

The login password is the value specified for creating the container.

III. Test results

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report