Last active
December 20, 2015 07:09
-
-
Save cybersiddhu/6090741 to your computer and use it in GitHub Desktop.
Dockerfile for pglite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| mkdir /usr/share/zoneinfo /data | |
| chown default /data | |
| head -c 16 /dev/urandom | sha1sum | cut -c1-10 > /pwfile | |
| echo "PG_PASSWORD=$(cat /pwfile)" | |
| su default -s /usr/bin/initdb -- --pgdata=/data --pwfile=/pwfile --username=postgres --auth=trust >/dev/null | |
| echo host all all 0.0.0.0 0.0.0.0 md5 >> /data/pg_hba.conf | |
| exec su default -s /usr/bin/postgres -- -D /data -c 'listen_addresses=*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment