Last active
December 16, 2015 20:39
-
-
Save jpetazzo/5494158 to your computer and use it in GitHub Desktop.
PostgreSQL for dotcloud-builder
This file contains 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
from ubuntu:precise | |
run LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y -q postgresql-9.1 postgresql-contrib-9.1 | |
copy postgresql.run /init |
This file contains 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/bash | |
echo 'host all all 0.0.0.0/0 md5' >> /etc/postgresql/9.1/main/pg_hba.conf | |
su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres --single -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" <<< "CREATE USER root WITH SUPERUSER PASSWORD '$1';" | |
su postgres sh -c "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf -c listen_addresses=*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've built a more complete PostgreSQL image: https://github.com/orchardup/docker-postgresql