We are using the official MediaWiki Docker image and want to be able to add additional MediaWiki extensions.
Questions:
- What is the recommended next step here if we are currently using the docker-compose file below were we mount volumes on the host? Is it to build a new image that wraps the official image? Is there an example somewhere of this modified new image for adding a mediawiki extension?
- Or can we just mount an extensions volume on the host in the current docker-compose and if needed make any adjustments the
LocalSettings.php
?
This link on the docker website refers to adding PHP extensions and libraries but its not clear to me if this is attempting to be the same answer if wanting to add MediaWiki specific extensions since it does clearly say "PHP Extensions". Or should this documentation page have actually said "MediaWiki Extensions" even though that implies they are written in PHP?
Here is our current docker-compose file entry for mediawiki:
mediawiki:
image: mediawiki
container_name: mediawiki_production
mem_limit: 4g
volumes:
- /var/www/mediawiki/uploads:/var/www/html/uploads
- /var/www/mediawiki/LocalSettings.php:/var/www/html/LocalSettings.php
environment:
- MEDIAWIKI_DB_NAME=
- MEDIAWIKI_DB_HOST=
- MEDIAWIKI_DB_USER=
- MEDIAWIKI_DB_PASSWORD=
- VIRTUAL_HOST=wiki.exmaple.com
- TERM=xterm
restart: always
network_mode: bridge
The extensions we are considering that are not part of the official image first off are (but would like a scalable solution for more later):
Any examples of an downstream docker image that uses the official mediawiki image as its "FROM" to include a mediawiki extension(s) and an updated docker-compose (if both are required) to be able to add mediawiki extensions would be helpful. Perhaps it may be good to explain what needs to change if the mediawiki extension itself relies on php extensions or libraries that are not already included in base image already vs adding a mediawiki extension that doesn't rely on any additional php extensions or libraries.