Last active
April 10, 2022 15:22
-
-
Save nodew/a663e1db59211e3a06820e3cd06b5e3b to your computer and use it in GitHub Desktop.
Run PostgresSQL in docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker volume create pgdata | |
docker run -d ` | |
--name my_postgres ` | |
-e POSTGRES_USER=postgres ` | |
-e POSTGRES_PASSWORD=myPassword ` | |
-e POSTGRES_DB=postgres ` | |
-e PGDATA=/var/lib/postgresql/data/pgdata ` | |
-v pgdata:/var/lib/postgresql/data/pgdata ` | |
-p 5432:5432 ` | |
postgres:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment