Created
September 1, 2018 17:37
-
-
Save ramses-lopez/18fdc563b0275030515a8c3428937a07 to your computer and use it in GitHub Desktop.
Docker + Postgres
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
// create instance | |
docker run -d -p 5432:5432 --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword postgres | |
// enter instance | |
docker exec -it my-postgres bash | |
// ... create users, dbs, w/e ... | |
// Install psql on local machine | |
sudo apt-get install postgresql-client | |
// Connect to postgres instance | |
psql -h localhost -p 5432 -U postgres -W |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment