Skip to content

Instantly share code, notes, and snippets.

@keiichiroy
Last active November 29, 2019 01:59
Show Gist options
  • Select an option

  • Save keiichiroy/05282498fc4df4e7fbf54d197fc28b48 to your computer and use it in GitHub Desktop.

Select an option

Save keiichiroy/05282498fc4df4e7fbf54d197fc28b48 to your computer and use it in GitHub Desktop.
Create PostgreSQL persisted environment using Docker
```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