Last active
November 29, 2019 01:59
-
-
Save keiichiroy/05282498fc4df4e7fbf54d197fc28b48 to your computer and use it in GitHub Desktop.
Create PostgreSQL persisted environment using Docker
This file contains hidden or 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
| ```bash | |
| docker run -d --user "$(id -u):$(id -g)" -v /etc/passwd:/etc/passwd:ro -v $(pwd)/data:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:10.10 | |
| ``` | |
| ```bash | |
| psql -h localhost -p 5432 -U postgres -W -d postgres | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment