33 lines
852 B
Docker
33 lines
852 B
Docker
FROM ubuntu:14.04
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y apache2 php5 php5-sqlite php5-curl && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN echo \
|
|
"ServerName localhost\n" \
|
|
"<Directory /var/www/html/data/>\n" \
|
|
" Deny from all\n" \
|
|
"</Directory>\n" \
|
|
"<Directory /var/www/html/data/favicons/>\n" \
|
|
" Allow from all\n" \
|
|
"</Directory>\n" >> /etc/apache2/apache2.conf
|
|
|
|
COPY . /var/www/html
|
|
|
|
RUN rm -rf /var/www/html/index.html /var/www/html/data/* && \
|
|
mkdir /var/www/html/data/favicons && \
|
|
chown -R www-data:www-data /var/www/html/data
|
|
|
|
VOLUME /var/www/html/data
|
|
|
|
EXPOSE 80
|
|
|
|
ENV APACHE_RUN_USER www-data
|
|
ENV APACHE_RUN_GROUP www-data
|
|
ENV APACHE_LOG_DIR /var/log/apache2
|
|
ENV APACHE_LOCK_DIR /var/lock/apache2
|
|
ENV APACHE_PID_FILE /var/run/apache2.pid
|
|
|
|
CMD /usr/sbin/apache2ctl -D FOREGROUND
|