FROM alpine:3.12

RUN apk add php7-apache2 php7-ldap php7-session php7-json php7-pecl-redis
RUN sed -i "s|/var/www/localhost/htdocs|/var/www/html|g" /etc/apache2/httpd.conf
# RUN rm /var/log/apache2/access.log /var/log/apache2/error.log
RUN ln -s /dev/stdout /var/log/apache2/access.log
RUN ln -s /dev/stderr /var/log/apache2/error.log
RUN mkdir /var/www/html
COPY www/ /var/www/html
WORKDIR /var/www/html

VOLUME /var/www/html
EXPOSE 80
CMD ["/usr/sbin/httpd","-D","FOREGROUND"] 