diff --git a/Dockerfile b/Dockerfile index b8739be..4f5456b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN docker-php-ext-configure pgsql --with-pgsql=/usr/local/pgsql && \ ENV PLUGGABLE_AUTH_VERSION=REL1_41-0273c84 ENV OPENID_CONNECT_VERSION=REL1_41-7aa039e ENV TEMPLATE_STYLES_VERSION=REL1_41-a9dde29 +ENV QUICK_INSTANT_COMMONS_VERSION=REL1_41-c472ea9 RUN export PLUGGABLE_AUTH_SHA256SUM=9a3d8d7c1e5234bf932747b08b09c2577b08afb252a6dd995b1b0e26beb97af9 && \ export archive=PluggableAuth-${PLUGGABLE_AUTH_VERSION}.tar.gz && \ @@ -30,6 +31,13 @@ RUN export TEMPLATE_STYLES_SHA256SUM=74c3287f8c8658d6e12dc16a2dd8587505695f684eb tar --extract --gzip --file /tmp/${archive} --directory /var/www/html/extensions && \ rm /tmp/${archive} +RUN export QUICK_INSTANT_COMMONS_SHA256SUM=83dfbc9558255bb6e748b3d794b9e1a5a78395ec337787ab1a0ce7d4e2db6f59 && \ + export archive=QuickInstantCommons-${QUICK_INSTANT_COMMONS_VERSION}.tar.gz && \ + curl --location --silent --output /tmp/${archive} https://extdist.wmflabs.org/dist/extensions/${archive} && \ + echo "${QUICK_INSTANT_COMMONS_SHA256SUM} /tmp/${archive}" | sha256sum --check && \ + tar --extract --gzip --file /tmp/${archive} --directory /var/www/html/extensions && \ + rm /tmp/${archive} + RUN echo '{ "extra": { "merge-plugin": { "include": [ "extensions/OpenIDConnect/composer.json" ] } } }' \ > /var/www/html/composer.local.json && \ php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && \ diff --git a/README.md b/README.md index 66bcc95..777d179 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Currently used mediawiki extensions in this customized docker image: * [PluggableAuth](https://www.mediawiki.org/wiki/Extension:PluggableAuth) * [OpenID_Connect](https://www.mediawiki.org/wiki/Extension:OpenID_Connect) * [TemplateStyles](https://www.mediawiki.org/wiki/Extension:TemplateStyles) +* [QuickInstantCommons](https://www.mediawiki.org/wiki/Extension:QuickInstantCommons) ### Updating the docker image @@ -22,11 +23,14 @@ First, update the `FROM` image tag in the `Dockerfile` to the newest version, for example `1.41.0`. Next, download the newest version of each extension (matching the mediawiki docker -image version, e.g. `1.41.0`) and get the SHA256 hash for each file: +image version, e.g. `1.41.0`) ... 1. PluggableAuth download https://www.mediawiki.org/wiki/Special:ExtensionDistributor/PluggableAuth 2. OpenID_Connect download https://www.mediawiki.org/wiki/Special:ExtensionDistributor/OpenIDConnect 3. TemplateStyles download https://www.mediawiki.org/wiki/Special:ExtensionDistributor/TemplateStyles +4. QuickInstantCommons download https://www.mediawiki.org/wiki/Special:ExtensionDistributor/QuickInstantCommons + +... and replace the SHA256 hash in `Dockerfile` for each file by running: ``` NEW_PLUGGABLE_AUTH_HASH=$(sha256sum ~/Downloads/PluggableAuth-REL1_41-0273c84.tar.gz | cut -d " " -f1) @@ -37,10 +41,10 @@ sed -i "s/OPENID_CONNECT_SHA256SUM= *[^ ]*/OPENID_CONNECT_SHA256SUM=${NEW_OPENID NEW_TEMPLATE_STYLE_HASH=$(sha256sum ~/Downloads/TemplateStyles-REL1_41-a9dde29.tar.gz | cut -d " " -f1) sed -i "s/TEMPLATE_STYLES_SHA256SUM= *[^ ]*/TEMPLATE_STYLES_SHA256SUM=${NEW_TEMPLATE_STYLE_HASH}/" Dockerfile -``` -Copy the hash in the output of each command and paste it into the variables -`*_SHA256SUM` in `Dockerfile`, replacing the old hashes. +NEW_QUICK_INSTANT_COMMONS_HASH=$(sha256sum ~/Downloads/QuickInstantCommons-REL1_41-c472ea9.tar.gz | cut -d " " -f1) +sed -i "s/QUICK_INSTANT_COMMONS_SHA256SUM= *[^ ]*/QUICK_INSTANT_COMMONS_SHA256SUM=${NEW_QUICK_INSTANT_COMMONS_HASH}/" Dockerfile +``` After making your changes and [testing them locally](#local-testing), run the following to trigger a [CI build and push](https://git.pub.solar/pub-solar/mediawiki-oidc-docker/actions)