diff options
Diffstat (limited to 'Services/apache/Dockerfile')
-rw-r--r-- | Services/apache/Dockerfile | 25 |
1 files changed, 15 insertions, 10 deletions
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 <dev@startx.fr> 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 |