So this midnight I tried to run postgresql 10 on docker. Few notes I get so far:
- Use official image or build from official Dockerfile
- Provide postgres password using environment variable
POSTGRES_PASSWORD
- Never forget to store in persistence volume on host, use
-v /host/path/data:/var/lib/postgresql/data
- On default config pg_hba.conf, it will use MD5 auth-method. (read for more here)
- I can't use .pgpass if auth-method is
MD5
orpassword
- To use .pgpass, I need to change auth-method to
trust