MediaWiki/Wikibase Docker Image
-
Built from the official latest MediaWiki docker image
-
With standard and MaRDI extensions preinstalled
-
Staging image is built automatically on push to main or on merging a PR
-
Production image is only built when pushing a tag
- Creates an Ubuntu container with git and curl
- Downloads MediaWiki extensions from specified source repositories using
clone_all.sh
- Removes git artifacts (.git folders) to clean up the build
- Uses the official MediaWiki Docker container as base
- Places downloaded repositories from the fetcher into MediaWiki's extensions folder
- Runs
composer install
to execute extension-specific installation steps
- Creates the final container image based on MediaWiki
- Installs prerequisite packages
- Copies MediaWiki content (including extensions) from the composer stage
- Adds additional data and configuration files
- Creates necessary endpoints
- Copies settings templates to the final container image
base
: Contains all the extension configuration that is shared both in production and stagingstaging
: Contains configuration files that are only installed in the staging imageproduction
: Contains configuration files that are only installed in the production image
Manually trigger the Create Release Tag action.
- Create and push a new signed tag with the newer version to trigger a production release:
git tag -s <tag_version>
git push origin <tag_version>
- Manually create the release through the Github UI from the corresponding tag
shellscript | description |
---|---|
clone-all.sh | clone all extensions from github with the correct branch |
wait-for-it.sh | wait for ports in other containers to be actually available (not the same as waiting that the container has started) |
entrypoint.sh | Entrypoint of the container, installs the wiki's maintenance/install scripts |
extra-install.sh | creates elastic search index and OAuth settings for Quickstatements |
To install and activate a new extension you have to:
- Add it to the
clone_all.sh
script in theEXTENSIONS
array:
"AdvancedSearch ${WMF_BRANCH} https://github.com/wikimedia/mediawiki-extensions-AdvancedSearch.git"
- Activate and configure it as required with the corresponding
php
file underbase
,staging
orproduction
in theLocalSettings.d
directory.
docker build -t ghcr.io/mardi4nfdi/docker-wikibase:main .
docker pull ghcr.io/mardi4nfdi/docker-wikibase:main
docker tag ghcr.io/mardi4nfdi/docker-wikibase:main ghcr.io/mardi4nfdi/docker-wikibase:stable
docker push ghcr.io/mardi4nfdi/docker-wikibase:stable