https://docs.docker.com/examples/postgresql_service/
0
FROM ubuntu MAINTAINER [email protected]
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
9.3.RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
python-software-properties, software-properties-common and PostgreSQL 9.3RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.3 postgresql-client-9.3 postgresql-$
apt-get cleanapt-getpostgres user created by the postgres-9.3 package when it was apt-get installedUSER postgres
docker with docker as the password anddocker owned by the docker role.&&\ to run commands one after the other - the \RUN /etc/init.d/postgresql start &&
psql --command "CREATE USER mamdouh WITH SUPERUSER PASSWORD '123456789';" &&
createdb -O mamdouh mamdouh
apt-get cleanapt-getpostgres user created by the postgres-9.3 package when it was apt-get installedUSER postgres
docker with docker as the password anddocker owned by the docker role.&&\ to run commands one after the other - the \RUN /etc/init.d/postgresql start &&
psql --command "CREATE USER mamdouh WITH SUPERUSER PASSWORD '123456789';" &&
createdb -O mamdouh mamdouh
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
listen_addresses to /etc/postgresql/9.3/main/postgresql.confRUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
EXPOSE 5432
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]
No tags have been pushed to this repository yet.