Skip to content

Instantly share code, notes, and snippets.

@alexrudy
Created December 31, 2017 03:02
Show Gist options
  • Save alexrudy/77747929dcafc0446d74073655ab5f4c to your computer and use it in GitHub Desktop.
Save alexrudy/77747929dcafc0446d74073655ab5f4c to your computer and use it in GitHub Desktop.
Spin up Postgres in a docker container.
#!/usr/bin/env sh
docker run --rm --name local-postgres -e POSTGRES_PASSWORD=$(op get item "local postgres" | jq -r '.details.password') -d -p 5432:5432 -v "$HOME/Documents/postgres/data:/var/lib/postgresql/data" postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment