Posted by & filed under Docker.

MediaWiki Docker container with VisualEditor Plugin and Parsoid Service

mediawikiI recently moved my server infrastructure to Docker and had to port a MediaWiki setup with the VisualEditor plugin and its dependant Parsoid service. It was already time consuming to get these three working in a classic setup and i found no existing Docker image(s) that were satisfying. So i decided to create my own.

The image is based on the official PHP7 images and is running a Nginx webserver and PHP-FPM. There will be three master processes (Nginx, PHP-FPM, Parsoid) running in the container that are controlled by supervisord.

You can easily start a full featured MediaWiki instance on a Docker host with the following commands.

Start a MySQL container. If you don’t have one running already:

docker run --name=some-mysql \
-e MYSQL_DATABASE=wikidb \
-e MYSQL_USER=wikiuser \
-e MYSQL_PASSWORD=mysecret \
-v /srv/mediawiki/mysql:/var/lib/mysql \
-d mysql:5.7

Start MediaWiki container:

docker run --name some-wiki \
--link some-mysql:mysql \
-p 8080:80 \
-e MEDIAWIKI_SERVER=http://localhost:8080 \
-e MEDIAWIKI_DB_HOST=some-mysql \
-e MEDIAWIKI_DB_USER=wikiuser \
-v /srv/mediawiki/images:/images \
-d kristophjunge/mediawiki

Create a new database by using the install script. Insert username and password for your admin account.

$ docker exec -i -t some-wiki /script/ <username> <password>

Leave a Reply

  • (will not be published)