webserver with php5.6
FROM ubuntu:16.04
# Install Apache PHP + extensions
RUN apt-get update && apt-get install -y software-properties-common \
python-software-properties
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update && apt-get install -y \
apache2 \
php5.6 \
php5.6-mysql \
php5.6-mbstring
RUN apt-get install -y git iproute2 vim
# Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"
# Configure Apache
ADD apache/www.domaine-legal.com.conf /etc/apache2/sites-available/
RUN a2ensite www.domaine-legal.com
RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf
RUN echo 'date.timezone = "Europe/Paris"' >> /etc/php/5.6/apache2/php.ini
# Install node modules
RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
RUN npm install bower -g
RUN echo "{ \"allow_root\": true }" > /root/.bowerrc
WORKDIR /var/www/html
EXPOSE 80
CMD /usr/sbin/apache2ctl -D FOREGROUND