From 348568c89ae1ad19270e930c02a1492bc43e99b1 Mon Sep 17 00:00:00 2001 From: startxfr Date: Sat, 28 Nov 2015 19:46:13 +0100 Subject: Adding display of OS flavour at startup and improving flexibility of services with env param --- Services/apache/Dockerfile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'Services/apache/Dockerfile') diff --git a/Services/apache/Dockerfile b/Services/apache/Dockerfile index 72a8ee8..24dc063 100644 --- a/Services/apache/Dockerfile +++ b/Services/apache/Dockerfile @@ -4,20 +4,25 @@ MAINTAINER Christophe LARUE USER root RUN dnf -y install httpd && \ dnf clean all -COPY httpd.conf /etc/httpd/conf.d/app.conf +ENV HTTPDCONF=/etc/httpd/conf.d/app.conf \ + STARTUPLOG=/data/logs/httpd/startup.log \ + LOG_PATH=/data/logs/httpd \ + APP_PATH=/data/httpd +COPY httpd.conf $HTTPDCONF COPY *.sh /bin/ RUN chmod 775 /bin/run.sh /bin/sx-httpd.sh && \ - chmod ug+r /etc/httpd/conf.d/app.conf && \ + chmod ug+r $HTTPDCONF && \ rm -f /etc/httpd/conf.d/autoindex.conf && \ rm -f /etc/httpd/conf.d/welcome.conf && \ mkdir /data && \ - mkdir /data/www && \ - mkdir /data/logs -COPY ./ /data/www -RUN rm -f /data/www/Dockerfile /data/www/httpd.conf /data/www/run.sh /data/www/sx-httpd.sh && \ - chown -R apache:apache /data/www /data/logs + mkdir $APP_PATH && \ + mkdir /data/logs && \ + mkdir $LOG_PATH && \ + touch $STARTUPLOG +COPY ./ $APP_PATH +RUN rm -f $APP_PATH/Dockerfile $APP_PATH/httpd.conf $APP_PATH/run.sh $APP_PATH/sx-httpd.sh && \ + chown -R apache:apache $APP_PATH /data/logs -EXPOSE 80 -EXPOSE 443 -VOLUME ["/data/www","/data/logs"] +EXPOSE 80 443 +VOLUME [$APP_PATH,$LOG_PATH] CMD ["/bin/run.sh"] \ No newline at end of file -- cgit v1.2.3