Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 640 Bytes

README.md

File metadata and controls

39 lines (33 loc) · 640 Bytes

Postgres

Default values

TZ         = UTC
LANG       = en_US.UTF-8
PGDATABASE = postgres
PGUSER     = postgres
PGPASSWORD = postgres
PGDATA     = /var/pgsql/data

Quick run

docker run --rm -it \
  -e TZ=Brazil/East \
  -e LANG=pt_BR.UTF-8 \
  -e PGDATABASE=my_db \
  -e PGUSER=user \
  -e PGPASSWORD=password \
  -p 5432:5432 \
  postgres:15.4

Using Docker Secrets

docker run --rm -it \
  -e TZ=Brazil/East \
  -e LANG=pt_BR.UTF-8 \
  -e PGDATABASE=my_db \
  -e PGUSER=user \
  -v ./pgpassword.secret:/run/secrets/pgpassword \
  -v pg_data:/var/pgsql/data \
  -p 5432:5432 \
  postgres:15.4