FROM debian:jessie

RUN apt-get update && apt-get install -y \
    apache2 \
    php5 \
    php5-gd \
    php5-mysql \
    php5-imagick \
    imagemagick \
    php-apc 

# APACHE
ADD katao.conf /etc/apache2/sites-available/

RUN a2dissite 000-default.conf
RUN a2ensite katao.conf
RUN a2enmod rewrite
RUN a2enmod ssl
RUN a2enmod headers

# PHP
RUN php5enmod imagick

# Simple startup script to avoid some issues observed with container restart 
ADD start-apache.sh /start-apache.sh
RUN chmod -v +x /start-apache.sh

CMD ["/start-apache.sh"]

EXPOSE 80
EXPOSE 443
