Commit ca7eaf62 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

adding support for phpmd, phpcpd, site_audit

parent 8dae0113
......@@ -3,46 +3,28 @@
# VERSION 0.2
# DOCKER-VERSION 0.4
FROM ubuntu:14.04
MAINTAINER Ricardo Amaro <mail@ricardoamaro.com>
MAINTAINER Ernesto Rodriguez Ortiz <ernesto.rodriguezortiz@savoirfairelinux.com>
#RUN echo "deb http://archive.ubuntu.com/ubuntu saucy main restricted universe multiverse" > /etc/apt/sources.list
# Update software source
RUN apt-get update
#RUN apt-get -y upgrade
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install curl wget git mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php-apc php5-gd php5-curl php5-memcache memcached mc php-pear
# Install Apache, MySQL, PHP, and others..
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install curl wget git mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php-apc php5-gd php5-curl php5-memcache memcached mc php-pear postfix php5-imagick php5-dev build-essential
RUN DEBIAN_FRONTEND=noninteractive apt-get autoclean
RUN pear channel-discover pear.drush.org && pear install drush/drush
# Install drush, phpmd, phpcpd, site_audit
RUN pear channel-discover pear.drush.org && pear install drush/drush
RUN pear channel-discover pear.phpmd.org && pear channel-discover 'pear.pdepend.org' && pear install --alldeps 'phpmd/PHP_PMD'
RUN wget http://pear.phpunit.de/get/phpcpd.phar && chmod +x phpcpd.phar && mv phpcpd.phar /usr/local/bin/phpcpd
RUN drush dl site_audit -y
# Make mysql listen on the outside
RUN sed -i "s/^bind-address/#bind-address/" /etc/mysql/my.cnf
RUN easy_install supervisor
COPY ./deploy/jenkins-post-build.sh /jenkins-post-build.sh
COPY ./deploy/foreground.sh /etc/apache2/foreground.sh
COPY ./deploy/supervisord.conf /etc/supervisord.conf
#Drupal make
COPY ./sfl/sflinux.make /var/www/drupal/sflinux.make
COPY ./sfl/drupal-org-core.make /var/www/drupal/drupal-org-core.make
# Retrieve drupal
RUN mkdir /var/www/drupal; cd /var/www/drupal ; drush make --prepare-install sflinux.make src --yes
RUN drush status
RUN chmod a+w /var/www/drupal/src/sites/default ; chown -R www-data:www-data /var/www/drupal
RUN rm /var/www/drupal/src/sites/default/settings.php
#Add profile
COPY ./sfl/sflinux /var/www/drupal/src/profiles/sflinux
#Copy vhost configuration and enable modules
COPY ./deploy/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite vhost_alias
RUN service apache2 restart
RUN chmod 755 /jenkins-post-build.sh /etc/apache2/foreground.sh
COPY apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
CMD ["/bin/bash", "/jenkins-post-build.sh"]
CMD ["apache2-foreground"]
\ No newline at end of file
......@@ -2,4 +2,5 @@
set -e
# Apache gets grumpy about PID files pre-existing
rm -f /var/run/apache2/apache2.pid
source /etc/apache2/envvars
exec apache2 -DFOREGROUND
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment