Last active
August 29, 2015 14:06
-
-
Save TheWaWaR/c5b33e87a30b1367cf7c to your computer and use it in GitHub Desktop.
Dockerfile for postgresql-server
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
| FROM centos:centos7 | |
| MAINTAINER weet <thewawar@gmail.com> | |
| RUN yum install -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm | |
| RUN yum install -y postgresql93-server postgresql93-contrib | |
| RUN /usr/pgsql-9.3/bin/postgresql93-setup initdb | |
| RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/9.3/data/pg_hba.conf | |
| RUN echo "listen_addresses='*'" >> /var/lib/pgsql/9.3/data/postgresql.conf | |
| USER postgres | |
| RUN /usr/pgsql-9.3/bin/pg_ctl start -D /var/lib/pgsql/9.3/data -s -w && psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" && /usr/pgsql-9.3/bin/pg_ctl stop -D /var/lib/pgsql/9.3/data -s -w | |
| EXPOSE 5432 | |
| ENTRYPOINT ["/usr/pgsql-9.3/bin/postgres", "-D", "/var/lib/pgsql/9.3/data"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment