summaryrefslogtreecommitdiffstats
path: root/Services/postgres/Dockerfile
diff options
context:
space:
mode:
authorstartxfr <clarue@startx.fr>2015-11-30 03:25:20 +0100
committerstartxfr <clarue@startx.fr>2015-11-30 03:25:20 +0100
commitff24be233ac7b10221142675b205b347b5588fd7 (patch)
tree3cef32fbae043936558b528f9e421109ef547614 /Services/postgres/Dockerfile
parentd3189d55206417557b03fde732693aaffca54cf8 (diff)
downloadphpmyadmin-ff24be233ac7b10221142675b205b347b5588fd7.tar.gz
phpmyadmin-ff24be233ac7b10221142675b205b347b5588fd7.tar.bz2
phpmyadmin-ff24be233ac7b10221142675b205b347b5588fd7.tar.xz
phpmyadmin-ff24be233ac7b10221142675b205b347b5588fd7.zip
reshape of postgresql
Diffstat (limited to 'Services/postgres/Dockerfile')
-rw-r--r--Services/postgres/Dockerfile29
1 files changed, 16 insertions, 13 deletions
diff --git a/Services/postgres/Dockerfile b/Services/postgres/Dockerfile
index 2af22b1..a8da28e 100644
--- a/Services/postgres/Dockerfile
+++ b/Services/postgres/Dockerfile
@@ -1,19 +1,22 @@
FROM startx/fedora
MAINTAINER Christophe LARUE <dev@startx.fr>
+USER root
RUN dnf -y install postgresql postgresql-libs postgresql-server \
- && dnf clean all \
- && mkdir -p /var/log/pgsql /var/lib/pgsql \
- && touch /var/log/pgsql/.keep /var/lib/pgsql/.keep \
- && chown -R postgres:postgres /var/log/pgsql /var/lib/pgsql
-# Copy startx toolkit
-COPY sx/* /sx/
-COPY postgresql.conf /var/lib/pgsql/postgresql.conf
-RUN chmod ug+rx /sx/postgres* \
- && chown -R postgres:postgres /sx/postgresql*
+ && dnf clean all && \
+ mkdir -p /tmp/sql
+ENV STARTUPLOG=/data/logs/postgresql/startup.log \
+ LOG_PATH=/data/logs/postgresql \
+ DATA_PATH=/data/postgresql \
+ LOADSQL_PATH=/tmp/sql
+COPY *.sh /bin/
+COPY *.sql $LOADSQL_PATH/
+RUN chmod 775 /bin/run.sh && \
+ mkdir -p $DATA_PATH && \
+ mkdir -p $LOG_PATH && \
+ touch $STARTUPLOG && \
+ chown -R postgres:postgres $LOG_PATH $DATA_PATH $LOADSQL_PATH
-USER postgres
EXPOSE 5432
-VOLUME ["/var/log/pgsql", "/var/lib/pgsql"]
-
-CMD ["/sx/postgresql_run.sh"] \ No newline at end of file
+VOLUME [$DATA_PATH,$LOG_PATH]
+CMD ["/bin/run.sh"]