Skip to content

Instantly share code, notes, and snippets.

@jricardo27
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save jricardo27/aaafcbd1e4f32eda9b49 to your computer and use it in GitHub Desktop.

Select an option

Save jricardo27/aaafcbd1e4f32eda9b49 to your computer and use it in GitHub Desktop.
Postgres docker (mac)
# https://registry.hub.docker.com/_/postgres/
docker pull postgres
docker run --name my_postgres -p 0.0.0.0:5432:5432 -e POSTGRES_PASSWORD=qwerty123 -d postgres
echo "Connect to the database"
# This requires boot2docker on mac
echo "psql -h $(boot2docker ip) -p 5432 -U postgres"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment