Skip to content

Instantly share code, notes, and snippets.

@koron
Last active April 14, 2023 08:39
Show Gist options
  • Save koron/ee94e55f6de0ae50b82078f2477a7452 to your computer and use it in GitHub Desktop.
Save koron/ee94e55f6de0ae50b82078f2477a7452 to your computer and use it in GitHub Desktop.
PostgreSQL for unit testing on Docker

Dockerで非永続的なPostgreSQLインスタンスを高速に起動するオプションの例

$ docker run --rm -it --name foo -p 5432:5432 --mount type=tmpfs,dst=//var/lib/postgresql/data -e POSTGRES_PASSWORD=abcd1234 postgres:14.7-alpine3.17 --fsync=off --full_page_writes=off --synchronous_commit=off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment