aboutsummaryrefslogtreecommitdiffstats
path: root/build/test/gondul-db-test.Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'build/test/gondul-db-test.Dockerfile')
-rw-r--r--build/test/gondul-db-test.Dockerfile6
1 files changed, 2 insertions, 4 deletions
diff --git a/build/test/gondul-db-test.Dockerfile b/build/test/gondul-db-test.Dockerfile
index b3d013b..38febc6 100644
--- a/build/test/gondul-db-test.Dockerfile
+++ b/build/test/gondul-db-test.Dockerfile
@@ -2,10 +2,8 @@ FROM debian:jessie
RUN apt-get update && apt-get install -y postgresql-9.4
ADD build/test/pg_hba.tail /pg_hba.tail
RUN cat /pg_hba.tail >> /etc/postgresql/9.4/main/pg_hba.conf
-RUN service postgresql start && su postgres -c "psql --command=\"CREATE ROLE nms PASSWORD 'risbrod' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;\"" && su postgres -c "createdb -O nms nms" && service postgresql stop
-ADD build/schema.sql /schema.sql
-RUN service postgresql start && su postgres -c "cat /schema.sql | psql nms" && service postgresql stop
ADD build/test/postgresql.conf /etc/postgresql/9.4/main/postgresql.conf
RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.4/main/postgresql.conf
-CMD pg_ctlcluster --foreground 9.4 main start
+CMD /opt/gondul/build/test/postgres.sh
+VOLUME /var/lib/postgresql
EXPOSE 5432