FROM robinthoni/debian-multiarch:jessie # FROM https://github.com/ZHAJOR/Docker-Apache-2.4-Php-5.6-for-Laravel MAINTAINER Robin Thoni ARG CONFIG_DIR=/etc/default/config-files/ ARG SPI_USER_UID=999 RUN apt-get update && apt-get -y install\ curl\ make\ build-essential\ gcc\ git\ unzip\ apache2=2.4.*\ libapache2-mod-php5\ php5\ php5-mcrypt\ php5-imagick\ php5-gd &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN curl https://getcomposer.org/composer.phar -o /usr/local/bin/composer \ && chmod +x /usr/local/bin/composer RUN /usr/sbin/a2enmod rewrite &&\ rm -rf /var/www/html &&\ mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\ chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html RUN rm -rf /var/log/* &&\ mkdir -p /var/log/apache2 &&\ ln -s /dev/stderr /var/log/apache2/error.log &&\ ln -s /dev/stdout /var/log/apache2/access.log &&\ ln -s /dev/stdout /var/log/apache2/other_vhosts_access.log COPY apache2.conf /etc/apache2/apache2.conf COPY ./backend/ /var/www/html/ RUN cd /var/www/html && composer install RUN cd /tmp && git clone https://github.com/piface/libmcp23s17 && cd libmcp23s17 && make && make install && cd / && rm /tmp/libmcp23s17 -rf RUN cd /tmp && git clone https://github.com/piface/libpifacedigital && cd libpifacedigital && make && make install && cd / && rm /tmp/libpifacedigital -rf RUN cd /tmp && git clone https://git.rthoni.com/camotion/piface && cd piface && make && make install && cd / && rm /tmp/piface -rf RUN groupadd -g "${SPI_USER_UID}" spi && usermod -a -G spi www-data COPY env "${CONFIG_DIR}" RUN chmod -R 777 /var/www/html/storage/ #&& ln -s /dev/stdout /var/www/html/storage/logs/lumen.log COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./common.sh /common.sh COPY ./run.sh /run.sh EXPOSE 80 CMD ["/run.sh"]