grim/containers/imfwiki

Parents 76de7f889a6b
Children ec5a7bc675c6
Add some new extensions and install the openid extension rather than the oauth2client extension
  • +18 -13
    Dockerfile
  • --- a/Dockerfile Wed Sep 02 01:23:34 2020 -0500
    +++ b/Dockerfile Wed Sep 02 02:30:39 2020 -0500
    @@ -3,6 +3,14 @@
    # Secure the upload directory
    COPY conf-enabled/ /etc/apache2/conf-enabled/
    +# install composer as some extensions need it
    +RUN set -ex && \
    + cd /usr/local/bin && \
    + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
    + php -r "if (hash_file('sha384', 'composer-setup.php') === '8a6138e2a05a8c28539c9f0fb361159823655d7ad2deecb371b04a83966c61223adc522b0189079e3e9e277cd72b8897') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
    + php composer-setup.php && \
    + php -r "unlink('composer-setup.php');"
    +
    # install unzip as composer wants it
    RUN set -ex && \
    apt-get update && \
    @@ -10,22 +18,19 @@
    apt-get clean && \
    rm -rf /var/lib/apt/lists
    -# install composer as one of our extensions needs it
    +# install some extensions
    RUN set -ex && \
    - cd /usr/local/bin && \
    - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
    - php -r "if (hash_file('sha384', 'composer-setup.php') === '8a6138e2a05a8c28539c9f0fb361159823655d7ad2deecb371b04a83966c61223adc522b0189079e3e9e277cd72b8897') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
    - php composer-setup.php && \
    - php -r "unlink('composer-setup.php');"
    + curl https://extdist.wmflabs.org/dist/extensions/Lockdown-REL1_34-95cdc71.tar.gz | tar xz -C /var/www/html/extensions && \
    + curl https://extdist.wmflabs.org/dist/extensions/MobileFrontend-REL1_34-6a8ef84.tar.gz | tar xz -C /var/www/html/extensions && \
    + curl https://extdist.wmflabs.org/dist/extensions/OpenIDConnect-REL1_34-1db264d.tar.gz | tar xz -C /var/www/html/extensions
    -# now install the mediawiki extensions we want
    +# copy composer.local.json to /var/www/html as the openidconnect plugins needed
    +# to add some stuff in there.
    +COPY composer.local.json /var/www/html/
    +
    +# run composer.phar update since we had some local changes
    RUN set -ex && \
    - cd /var/www/html/extensions && \
    - git clone https://github.com/Schine/MW-OAuth2Client.git && \
    - cd MW-OAuth2Client && \
    - git submodule update --init && \
    - cd vendors/oauth2-client && \
    - composer.phar install --no-dev --no-cache --prefer-dist
    + composer.phar update --prefer-dist --no-dev
    # add a /config directory and point a symlink to a LocalSettings.php file which
    # is volume mounted in at run time.