Skip to content

Instantly share code, notes, and snippets.

@slashdotdash
Created November 18, 2021 19:39
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 slashdotdash/6d57ac417215fe47323f98131923ecdd to your computer and use it in GitHub Desktop.
Save slashdotdash/6d57ac417215fe47323f98131923ecdd to your computer and use it in GitHub Desktop.
Run Postgres in-memory with Docker
docker pull postgres:12-alpine
docker run --rm \
--name postgres10 \
--tmpfs=/pgtmpfs \
-e PGDATA=/pgtmpfs \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_USER=postgres \
-p 5432:5432 \
postgres:10-alpine
docker run --rm \
--name postgres12 \
--tmpfs=/pgtmpfs \
-e PGDATA=/pgtmpfs \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_USER=postgres \
-p 5432:5432 \
postgres:12-alpine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment