Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##
- ## POSTGRES LITE DOCKERFILE- create db, user/pwd, and open listening
- ##
- FROM postgres:11.1-alpine
- ADD ./init.sh /docker-entrypoint-initdb.d/.
- ENV PGDATA /var/lib/postgresql/data
- EXPOSE 5432
- USER postgres
- RUN mkdir -p $PGDATA && chmod 0700 $PGDATA &&\
- initdb \
- --allow-group-access \
- --encoding=UTF8 \
- --pgdata=$PGDATA \
- --auth=trust \
- --auth-host=trust \
- --auth-local=trust &&\
- echo "host all all 0.0.0.0/0 md5" >> $PGDATA/pg_hba.conf &&\
- echo "listen_addresses='*'" >> $PGDATA/postgresql.conf &&\
- pg_ctl -D $PGDATA start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement