Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. FROM alpine:latest
  2.  
  3. ENV DEBIAN_FRONTEND=noninteractive
  4.  
  5. RUN apk update && \
  6. apk add postgresql && \
  7. mkdir /run/postgresql && \
  8. chown -R postgres:postgres /run/postgresql
  9.  
  10. USER postgres
  11.  
  12. RUN pg_ctl init -D /var/lib/postgresql/data && \
  13. echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf && \
  14. echo "local all postgres peer" >> /var/lib/postgresql/data/pg_hba.conf && \
  15. echo "listen_addresses='*'" >> /var/lib/postgresql/data/postgresql.conf && \
  16. chmod 0700 /var/lib/postgresql/data
  17.  
  18. ENTRYPOINT ["pg_ctl", "start", "-D", "/var/lib/postgresql/data"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement