2016-06-08 13:32:26 +00:00
|
|
|
FROM debian:jessie
|
2016-05-26 17:26:21 +00:00
|
|
|
|
|
|
|
# Install necessary programs
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2016-05-27 14:40:43 +00:00
|
|
|
|
2016-05-26 17:26:21 +00:00
|
|
|
RUN apt-get update && apt-get install -y apache2 libapache2-mod-php5 \
|
|
|
|
mysql-server php5 php5-mysql php5-mcrypt php5-curl php5-gd phpmyadmin vim \
|
|
|
|
wget curl git
|
|
|
|
|
|
|
|
# Configure apache
|
2016-06-08 13:32:26 +00:00
|
|
|
COPY ./config/apache2.conf /etc/apache2/apache2.conf
|
2016-05-26 21:05:29 +00:00
|
|
|
RUN chmod 644 /etc/apache2/apache2.conf
|
2016-05-26 17:26:21 +00:00
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
|
|
|
# Configure MySQL
|
|
|
|
COPY ./config/my.cnf /etc/mysql/my.cnf
|
2016-05-26 21:05:29 +00:00
|
|
|
RUN chmod 644 /etc/mysql/my.cnf
|
2016-05-26 18:26:15 +00:00
|
|
|
RUN service mysql start && mysql -u root --execute="GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '';"
|
2016-05-26 17:26:21 +00:00
|
|
|
EXPOSE 3306
|
|
|
|
|
2016-05-26 21:05:29 +00:00
|
|
|
# Configure PHPMyAdmin
|
|
|
|
COPY ./config/config.inc.php /etc/phpmyadmin/config.inc.php
|
|
|
|
RUN chmod 644 /etc/phpmyadmin/config.inc.php
|
|
|
|
|
2016-05-26 17:26:21 +00:00
|
|
|
# Install composer
|
2016-06-20 12:23:02 +00:00
|
|
|
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
2016-06-08 13:34:08 +00:00
|
|
|
php composer-setup.php && \
|
|
|
|
php -r "unlink('composer-setup.php');"
|
2016-05-26 17:26:21 +00:00
|
|
|
|
|
|
|
# Install magerun
|
|
|
|
RUN wget https://files.magerun.net/n98-magerun.phar && \
|
|
|
|
mv n98-magerun.phar /usr/bin/ && \
|
|
|
|
echo 'alias magerun="php -f /usr/bin/n98-magerun.phar --"' >> /root/.bashrc
|
|
|
|
|
|
|
|
# Install Accolade Magerun Tools
|
|
|
|
RUN mkdir -p /usr/local/share/n98-magerun/modules && \
|
|
|
|
git clone https://github.com/Accolades/MagerunTools.git /usr/local/share/n98-magerun/modules/MagerunTools
|
|
|
|
|
|
|
|
# Install Magento Mess Detector
|
|
|
|
RUN git clone https://github.com/AOEpeople/mpmd.git /usr/local/share/n98-magerun/modules/mpmd
|
|
|
|
|
|
|
|
# Install modman
|
|
|
|
RUN wget -q --no-check-certificate -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer | bash && \
|
|
|
|
mv ~/bin/modman /usr/local/bin/modman
|
|
|
|
|
|
|
|
# Start the web server
|
|
|
|
ENV APACHE_LOCK_DIR=/var/lock/apache2
|
|
|
|
ENV APACHE_PID_FILE=/var/run/apache2/apache2.pid
|
|
|
|
ENV APACHE_RUN_USER=www-data
|
|
|
|
ENV APACHE_RUN_GROUP=www-data
|
|
|
|
ENV APACHE_LOG_DIR=/var/log/apache2
|
2016-05-26 21:05:29 +00:00
|
|
|
|
|
|
|
# Fire up the image!
|
|
|
|
WORKDIR /var/www/html
|
2016-05-26 17:26:21 +00:00
|
|
|
ENTRYPOINT service mysql start; apache2 -DFOREGROUND
|