Skip to content

Commit af3191b

Browse files
committed
Add md5 password authentication for Postgres
Postgres image, by default, configures host-based authentication (pg_hba.conf) to trust from everywhere. So, no password is needed to connect to the database. Change this to use md5 password authentication.
1 parent d43ff02 commit af3191b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
FROM postgres:9.4
22

33
COPY init/ /docker-entrypoint-initdb.d
4+
5+
RUN echo "host all all 0.0.0.0/0 md5" > /var/lib/postgresql/data/pg_hba.conf

0 commit comments

Comments
 (0)