diff --git a/docker-compose.yml b/docker-compose.yml index 50135073..355d4581 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: - INSTALL_MONGO=false - INSTALL_XDEBUG=false - INSTALL_NODE=false + - INSTALL_DRUSH=false - COMPOSER_GLOBAL_INSTALL=false - PUID=1000 - PGID=1000 @@ -33,6 +34,7 @@ services: - INSTALL_XDEBUG=false - INSTALL_ZIP_ARCHIVE=false - INSTALL_MEMCACHED=false + - INSTALL_OPCACHE=false dockerfile: Dockerfile-70 volumes_from: - volumes_source diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index f1b8bd7c..62ac6f9f 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -92,8 +92,12 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ ##################################### # Opcache: ##################################### -RUN docker-php-ext-install opcache -RUN docker-php-ext-enable opcache +ARG INSTALL_OPCACHE=true +ENV INSTALL_OPCACHE ${INSTALL_OPCACHE} +RUN if [ ${INSTALL_OPCACHE} = true ]; then \ + docker-php-ext-install opcache && \ + docker-php-ext-enable opcache \ +;fi # diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index a4766bdc..8c296ce3 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -103,8 +103,13 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ ##################################### # Opcache: ##################################### -RUN docker-php-ext-install opcache -RUN docker-php-ext-enable opcache +ARG INSTALL_OPCACHE=true +ENV INSTALL_OPCACHE ${INSTALL_OPCACHE} +RUN if [ ${INSTALL_OPCACHE} = true ]; then \ + docker-php-ext-install opcache && \ + docker-php-ext-enable opcache \ +;fi + # diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 7caf004c..1f728bd0 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -37,6 +37,7 @@ MAINTAINER Mahmoud Zalt # - INSTALL_MONGO= false # - COMPOSER_GLOBAL_INSTALL= false # - INSTALL_NODE= false +# - INSTALL_drush= false # ##################################### @@ -100,16 +101,18 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \ ##################################### # Drush: ##################################### -ENV DRUSH_VERSION 8.1.2 - -# Install Drush 8 with the phar file. USER root -RUN curl -fsSL -o /usr/local/bin/drush "https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar" && \ - chmod +x /usr/local/bin/drush +ENV DRUSH_VERSION 8.1.2 +ARG INSTALL_DRUSH=true +ENV INSTALL_DRUSH ${INSTALL_DRUSH} +RUN if [ ${INSTALL_DRUSH} = true ]; then \ + # Install Drush 8 with the phar file. + curl -fsSL -o /usr/local/bin/drush https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar | bash && \ + chmod +x /usr/local/bin/drush && \ + drush core-status \ +;fi -#Check if drush works for the laradock user USER laradock -RUN drush core-status ##################################### # Node / NVM: