Commit 3a282723 authored by Ernesto Rodriguez Ortiz's avatar Ernesto Rodriguez Ortiz
Browse files

docker: Use sflinux/baseimage and the script to make the installations

The sflinux/baseimage is based in phusion/baseimage and not in ubuntu.
Using jenkins-post-build.sh to all the preparation, installation, and test process.
parent e146f25f
# docker Drupal
#
# VERSION 0.2
# DOCKER-VERSION 0.4
FROM sflinux/lampd
# VERSION 0.3
FROM sflinux/baseimage
MAINTAINER Ernesto Rodriguez Ortiz <ernesto.rodriguezortiz@savoirfairelinuc.com>
RUN easy_install supervisor
COPY ./deploy/supervisord.conf /etc/supervisord.conf
# Create project root directory and copy the structure
RUN mkdir /var/www/src && mkdir /var/www/output && mkdir /var/www/src/drupal
COPY build /var/www/build
COPY deploy /var/www/deploy
COPY doc /var/www/doc
COPY test /var/www/test
COPY site-install /var/www/site-install
# Setup ssh keys to clone git repo
RUN mkdir -p /root/.ssh
COPY ./deploy/id_rsa /root/.ssh/id_rsa
RUN mkdir -p /root/.ssh && cp /var/www/deploy/id_rsa /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
RUN ssh-keyscan gitlab.savoirfairelinux.com >> /root/.ssh/known_hosts
#RUN ssh -v gitlab.savoirfairelinux.com
# Drupal make
RUN mkdir /var/www/drupal
COPY ./deploy/jenkins-post-build.sh /var/www/drupal/jenkins-post-build.sh
COPY ./build/sfl-boilerplate.make /var/www/drupal/sfl-boilerplate.make
# Retrieve drupal
RUN drush make --prepare-install /var/www/drupal/sfl-boilerplate.make /var/www/drupal/src --yes
RUN cd /var/www/drupal/src && 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
#Copy vhost configuration and enable modules
COPY ./deploy/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN cp /var/www/deploy/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite vhost_alias
RUN service apache2 restart
RUN /bin/bash /var/www/drupal/jenkins-post-build.sh --audit
# Installer Drupal et ruler des tests
RUN /bin/bash /var/www/deploy/jenkins-post-build.sh --audit
#CMD ["/bin/bash","/var/www/drupal/jenkins-post-build.sh", "--audit"]
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