diff --git a/Dockerfile b/Dockerfile index 1a7d1d8..984e98e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,25 @@ ARG MEDIAWIKI_VERSION=${MEDIAWIKI_VERSION:-1.39} # TODO: This has to be template based. The variant apache/fpm has to be passed as variable to template. FROM mediawiki:${MEDIAWIKI_VERSION}-fpm +# Have to specify here to work inside this FROM +ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_38} + VOLUME [ "/var/www/html/images", "/var/www/html/cache", "/var/www/html/sitemap" ] # Composer RUN curl -L https://getcomposer.org/composer-2.phar > /usr/local/bin/composer RUN chmod +x /usr/local/bin/composer +# Install PHP extension gd for BlueSpiceFoundation +RUN apt-get update && apt-get install -y \ + libpng-dev \ + libzip-dev \ + zlib1g-dev \ + unzip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +RUN docker-php-ext-install gd zip + RUN pecl install redis && docker-php-ext-enable redis # Have to specify here to work inside this FROM @@ -18,7 +31,7 @@ ARG MEDIAWIKI_BRANCH=${MEDIAWIKI_BRANCH:-REL1_39} ARG MEDIAWIKI_EXTENSIONS=${MEDIAWIKI_EXTENSIONS:-'MobileFrontend TemplateStyles AccessControl Cargo WikiSEO Description2 MetaMaster ContactPage UserMerge RevisionSlider LastUserLogin ExternalLinkConfirm intersection ContributionScores CreatePageUw Lockdown CategoryLockdown ConfirmAccount '} # List of extensions need depencies install using composer. -ARG COMPOSER_INSTALL_EXTENSIONS=${COMPOSER_INSTALL_EXTENSIONS:-'GoogleLogin '} +ARG COMPOSER_INSTALL_EXTENSIONS=${COMPOSER_INSTALL_EXTENSIONS:-'GoogleLogin BlueSpiceFoundation '} ARG MEDIAWIKI_SKINS=${MEDIAWIKI_SKINS:-'MinervaNeue '} ARG GERRIT_REPO="https://gerrit.wikimedia.org/r/mediawiki" ARG EXTENSION_DIR="/var/www/html/extensions" @@ -50,7 +63,17 @@ RUN set -x; \ # DynamicPageList3 && git clone https://github.com/Universal-Omega/DynamicPageList3 $EXTENSION_DIR/DynamicPageList3 \ && cd $EXTENSION_DIR/DynamicPageList3 \ - && git checkout ${MEDIAWIKI_BRANCH} + && git checkout ${MEDIAWIKI_BRANCH} \ + # ExtJSBase - For BlueSpiceFoundation + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-ExtJSBase $EXTENSION_DIR/ExtJSBase \ + # OOJSPlus - For BlueSpiceFoundation + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-OOJSPlus $EXTENSION_DIR/OOJSPlus \ + # FilterableTables + && git clone --depth 1 --branch $MEDIAWIKI_BRANCH https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFilterableTables $EXTENSION_DIR/BlueSpiceFilterableTables \ + # BlueSpiceFoundation + && git clone https://github.com/wikimedia/mediawiki-extensions-BlueSpiceFoundation $EXTENSION_DIR/BlueSpiceFoundation \ + && cd $EXTENSION_DIR/BlueSpiceFoundation \ + && git checkout -q e8df20e44c60622cc70c81c00696ef754df2df58 # Skins RUN for skin in $MEDIAWIKI_SKINS; do \ git clone --depth 1 --branch $MEDIAWIKI_BRANCH $GERRIT_REPO/skins/$skin $SKIN_DIR/$skin; \ @@ -58,6 +81,8 @@ RUN for skin in $MEDIAWIKI_SKINS; do \ # Install composer dependencies for extensions RUN for extension in $COMPOSER_INSTALL_EXTENSIONS; do \ + # this is for BlueSpiceFoundation + composer --working-dir=$EXTENSION_DIR/$extension config --no-plugins allow-plugins.composer/installers true; \ composer --working-dir=$EXTENSION_DIR/$extension install --no-dev; \ done