Last active
July 1, 2017 02:39
-
-
Save filewalkwithme/f14d88e249471e1a2c11f723eed7895e to your computer and use it in GitHub Desktop.
run a local postgres container
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
# How to run the container | |
docker run --rm --name container-name -p 5432:5432 -e POSTGRES_USER=username -e POSTGRES_DB=dbname -e POSTGRES_PASSWORD=password -v /local/path/to/data/:/var/lib/postgresql/data postgres | |
# How to connect via psql | |
psql -h 0.0.0.0 -U username -W |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment