From 08ab29a803c6244433bc9b4c4c1ce6b1ff0b7f79 Mon Sep 17 00:00:00 2001 From: ubc-tuehoang Date: Thu, 7 Sep 2023 09:11:05 -0700 Subject: [PATCH] updated Dockerfile to use MW Dist extension method --- Dockerfile | 13 +++++++------ docker-entrypoint.sh | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9949d11..1b5912e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ RUN curl -L https://getcomposer.org/installer | php \ && php composer.phar install --no-dev RUN EXTS=`curl https://extdist.wmflabs.org/dist/extensions/ | awk 'BEGIN { FS = "\"" } ; {print $2}'` \ - && for i in VisualEditor Scribunto LiquidThreads Cite WikiEditor LDAPProvider PluggableAuth LDAPAuthentication2 ParserFunctions TemplateData InputBox Widgets Variables RightFunctions PageInCat CategoryTree LabeledSectionTransclusion UserPageEditProtection Quiz Collection DeleteBatch LinkTarget HitCounters Math 3D MultimediaViewer TimedMediaHandler; do \ + && for i in SmiteSpam VisualEditor Scribunto LiquidThreads Cite WikiEditor LDAPProvider PluggableAuth LDAPAuthentication2 ParserFunctions TemplateData InputBox Widgets Variables RightFunctions PageInCat CategoryTree LabeledSectionTransclusion UserPageEditProtection Quiz Collection DeleteBatch LinkTarget HitCounters Math 3D MultimediaViewer TimedMediaHandler; do \ FILENAME=`echo "$EXTS" | grep ^${i}-REL${WIKI_VERSION_STR}`; \ echo "Installing https://extdist.wmflabs.org/dist/extensions/$FILENAME"; \ curl -Ls https://extdist.wmflabs.org/dist/extensions/$FILENAME | tar xz -C /var/www/html/extensions; \ @@ -100,11 +100,12 @@ RUN EXTS=`curl https://extdist.wmflabs.org/dist/extensions/ | awk 'BEGIN { FS = # WARNING: if updating DynamicPageList3 from 3.5.1, check if fix below is still required \ && echo "Installing https://github.com/Universal-Omega/DynamicPageList3/archive/refs/tags/3.5.1.tar.gz" \ && mkdir -p /var/www/html/extensions/DynamicPageList \ - && curl -Ls https://github.com/Universal-Omega/DynamicPageList3/archive/refs/tags/3.5.1.tar.gz | tar xz --strip=1 -C /var/www/html/extensions/DynamicPageList \ - && echo "Installing SmiteSpam https://github.com/wikimedia/mediawiki-extensions-SmiteSpam/archive/REL1_39.zip" \ - && curl -L -o smitespam.zip https://github.com/wikimedia/mediawiki-extensions-SmiteSpam/archive/REL1_39.zip \ - && unzip smitespam.zip -d /var/www/html/extensions/ \ - && mv /var/www/html/extensions/mediawiki-extensions-SmiteSpam-REL1_39 /var/www/html/extensions/SmiteSpam + && curl -Ls https://github.com/Universal-Omega/DynamicPageList3/archive/refs/tags/3.5.1.tar.gz | tar xz --strip=1 -C /var/www/html/extensions/DynamicPageList + ##Comment out to use with MW Extension method + ##&& echo "Installing SmiteSpam https://github.com/wikimedia/mediawiki-extensions-SmiteSpam/archive/REL1_39.zip" \ + ##&& curl -L -o smitespam.zip https://github.com/wikimedia/mediawiki-extensions-SmiteSpam/archive/REL1_39.zip \ + ##&& unzip smitespam.zip -d /var/www/html/extensions/ \ + ##&& mv /var/www/html/extensions/mediawiki-extensions-SmiteSpam-REL1_39 /var/www/html/extensions/SmiteSpam #&& echo "Installing patched Math extension from https://github.com/ubc/mediawiki-extensions-Math/archive/REL1_35.tar.gz" \ #&& mkdir -p /var/www/html/extensions/Math \ #&& curl -Ls https://github.com/ubc/mediawiki-extensions-Math/archive/REL1_35.tar.gz | tar xz --strip=1 -C /var/www/html/extensions/Math diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3d77d7a..c1c1be1 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -239,5 +239,7 @@ mkdir -p images chown -R www-data: cache chmod 755 images +#Tue to remove +rm /data/installed exec "$@"