Docker installation postgreSQL 11.4

First, install

Command: docker pull postgres: 11.4

Docker installation postgreSQL 11.4

Second, run

Command: docker run --name postgres_demo -e POSTGRES_PASSWORD = password -p 54321: 5432 -d postgres: 11.4
after command complete view of the container:
Docker installation postgreSQL 11.4

He explained:
RUN: create and run a container;
--name: Specifies the name created container;
-e POSTGRES_PASSWORD = password: set the environment variable, the login password of the specified database is password;
-p 54321: 5432: The container port mapping 5432 port mapping to an external device port 54321;
-d postgres: 11.4: Specifies postgres: 11.4 as a mirror.

Note:
Postgres mirroring default user name postgres,
login password for the creation of a container is the specified value.

Third, the test results

Docker installation postgreSQL 11.4

Guess you like

Origin blog.51cto.com/1345992/2422007