diff --git a/build-scripts/drupal7/Dockerfile b/build-scripts/drupal7/Dockerfile index 87b199191b583e45d0b0c7a5cfc04d4cded4a04a..a7b0d1a19cbbbcc95248361b7d289ddd966c2726 100644 --- a/build-scripts/drupal7/Dockerfile +++ b/build-scripts/drupal7/Dockerfile @@ -18,7 +18,6 @@ RUN apt-get update && \ ## Add the repo to get the latest PHP versions RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 RUN export LANG=en_US.UTF-8 -##RUN add-apt-repository -y ppa:ondrej/php ## Need LC_ALL= otherwise adding the repos throws an ascii error. RUN LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php @@ -28,7 +27,7 @@ RUN add-apt-repository ppa:git-core/ppa RUN apt-get update -# Added so we can installs 8.x branch of nodejs. +# Added so we can install 8.x branch of nodejs. RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - # Install packages. @@ -40,6 +39,7 @@ RUN apt-get install -y \ php5.6-apc \ php5.6-fpm \ php5.6-xml \ + php5.6-simplexml \ php5.6-mbstring \ php5.6-cli \ php5.6-mysql \ @@ -49,7 +49,6 @@ RUN apt-get install -y \ php5.6-mcrypt \ php5.6-zip \ php-pear \ - php-xml \ libapache2-mod-php5.6 \ optipng \ jpegoptim \ @@ -63,7 +62,6 @@ RUN apt-get install -y \ wget \ ruby-sass \ ruby-compass \ - python-software-properties \ nodejs \ dos2unix \ supervisor @@ -83,7 +81,7 @@ RUN apt-get install php-uploadprogress RUN curl -sS https://getcomposer.org/installer | php RUN mv composer.phar /usr/local/bin/composer # Install Drush 7. -RUN composer global require drush/drush:7.* +RUN composer global require drush/drush:8.* RUN composer global update # Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So: RUN ln -s /root/.composer/vendor/bin/drush /usr/local/bin/drush @@ -102,21 +100,30 @@ RUN openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout /tmp/apache.key RUN cp /tmp/apache.crt /etc/ssl/certs/server.crt RUN cp /tmp/apache.key /etc/ssl/private/server.key -## Create the vagrant user so we can assign it later -## RUN useradd vagrant -p vagrant ## Add the "vagrant" user (because we are all familiar with having it) RUN useradd -d /home/vagrant -ms /bin/bash -g root -G sudo -p vagrant vagrant # Replace the default site configuration with our own. COPY 000-default.conf /etc/apache2/sites-available/000-default.conf +RUN a2enmod proxy_fcgi setenvif +RUN a2enconf php5.6-fpm +RUN service php5.6-fpm restart + +## Make sure we are running php5.6 +RUN update-alternatives --set php /usr/bin/php5.6 +RUN a2enmod php5.6 +RUN service apache2 restart + +## Check version of PHP +RUN php -v ## Install Drupal. -RUN drush dl -v -d drupal-7.59 --destination="/var/www" --drupal-project-rename="drupal7" +RUN drush dl -v -d drupal-7.60 --destination="/var/www" --drupal-project-rename="drupal7" RUN chown -R www-data:www-data /var/www/ ## Install the drush registry_rebuild module -RUN drush @none dl registry_rebuild +RUN drush @none dl registry_rebuild-7.x ## Create the config folder in drupal root and an empty password_settings file RUN mkdir /var/www/drupal7/config @@ -193,13 +200,6 @@ RUN sed -i "s/display_errors = .*/display_errors = On/" /etc/php/5.6/apache2/php sed -i "s/;date.timezone = */date.timezone = America\/Toronto/" /etc/php/5.6/apache2/php.ini && \ sed -i "s/;date.timezone = */date.timezone = America\/Toronto/" /etc/php/5.6/cli/php.ini -# Manually set up the apache environment variables -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 - # Expose the default Apache port. EXPOSE 80 EXPOSE 443 @@ -208,4 +208,4 @@ EXPOSE 443 ENTRYPOINT ["docker-entrypoint-d7.sh"] # If no command is passed to the container, start Apache by default. -CMD ["apachectl", "-D", "FOREGROUND"] \ No newline at end of file +CMD ["apachectl", "-D", "FOREGROUND"]