Sign inSign up

newdeveloper/apache-php-composer-redis

By newdeveloper

•Updated about 7 years ago

Image
1

388

newdeveloper/apache-php-composer-redis repository overview

⁠Apache php7.2 composer en redis-server

⁠Voor projecten zoals laravel met horison

⁠Dockerfile:

FROM newdeveloper/apache-php

⁠#Install dependencies

RUN apt update -y RUN apt upgrade -y RUN apt install -y git curl apache2 php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-xml php-gd php-zip php-curl php-tidy php-redis redis-server RUN apt install -y vim nano RUN curl -sS https://getcomposer.org/installer⁠ | php RUN mv composer.phar /usr/local/bin/composer RUN chmod +x /usr/local/bin/composer

⁠#Term aanmaken

RUN echo "export TERM=xterm" >> /root/.bashrc

⁠#Install app

RUN rm -rf /var/www/html/* ADD src /var/www/html/

⁠#Configure apache

RUN rm -f /etc/apache2/sites-available/000-default.conf ADD ./settings/000-default.conf /etc/apache2/sites-available/ RUN a2enmod rewrite RUN chown -R www-data:www-data /var/www/html/ 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 ARG DEBIAN_FRONTEND=noninteractive EXPOSE 80 COPY run.sh /run.sh RUN chmod a+rx /run.sh CMD ["/bin/bash", "/run.sh"]

⁠run.sh file:

rm -f /var/run/apache2/apache2.pid redis-server & apachectl -DFOREGROUND

⁠settings/000-default.conf file:

<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/public/

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/html/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>                                                                                                                                                                  

Tag summary

Content type

Image

Digest

Size

188.3 MB

Last updated

about 7 years ago

docker pull newdeveloper/apache-php-composer-redis