Skip to content

Instantly share code, notes, and snippets.

@javierav
Last active October 30, 2021 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javierav/21cb63d505657f231a34dd6c50651ec1 to your computer and use it in GitHub Desktop.
Save javierav/21cb63d505657f231a34dd6c50651ec1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
docker run \
-d \
--name "postgresql" \
--restart unless-stopped \
-p 5432:5432 \
--mount 'type=volume,source=postgresql_storage,target=/var/lib/postgresql/data,volume-driver=local' \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=postgres \
-e POSTGRES_PASSWORD=postgres \
postgres:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment