mediawiki-oidc-docker/Dockerfile

30 lines
1.6 KiB
Docker

FROM mediawiki:1.41.0
RUN apt-get update && apt-get install --yes curl libpq-dev tar unzip
RUN docker-php-ext-configure pgsql --with-pgsql=/usr/local/pgsql && \
docker-php-ext-install pgsql
ENV PLUGGABLE_AUTH_VERSION=REL1_41-0273c84
ENV OPENID_CONNECT_VERSION=REL1_41-7aa039e
RUN export PLUGGABLE_AUTH_SHA256SUM=9a3d8d7c1e5234bf932747b08b09c2577b08afb252a6dd995b1b0e26beb97af9 && \
export archive=PluggableAuth-${PLUGGABLE_AUTH_VERSION}.tar.gz && \
curl --location --silent --output /tmp/${archive} https://extdist.wmflabs.org/dist/extensions/${archive} && \
echo "${PLUGGABLE_AUTH_SHA256SUM} /tmp/${archive}" | sha256sum --check && \
tar --extract --gzip --file /tmp/${archive} --directory /var/www/html/extensions && \
rm /tmp/${archive}
RUN export OPENID_CONNECT_SHA256SUM=3d96788d28151056e7052d76e5264355daa39f5a825fd4489b0ce3d6b9607dc7 && \
export archive=OpenIDConnect-${OPENID_CONNECT_VERSION}.tar.gz && \
curl --location --silent --output /tmp/${archive} https://extdist.wmflabs.org/dist/extensions/${archive} && \
echo "${OPENID_CONNECT_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');" && \
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
composer update