Mediawiki running on Alpine Linux and NGINX
Quick and easy container to get Mediawiki running in a self-contained instance. Uses NGINX instead of Apache for better performance, and Alpine Linux for a smaller image.
- Install Docker
- Run the following:
docker run -p 8080:80 -v mediawiki:/var/www/mediawiki --name mediawiki sirsavary/mediawiki
This will spin up the Mediawiki instance on port 8080. Head over to localhost:8080 (or the IP of the host running the container) in your browser and begin the Mediawiki setup.
Once you've completed the setup, a file called
LocalSettings.php will download in your browser. Place this file inside the Mediawiki volume, which should be located at
If you want to modify the NGINX, Supervisor, or PHP-FPM settings you will need to clone this repository and edit the files in the
conf directory. You can then build and run the image, like so:
docker build -t mediawiki ./ docker run -p 8080:80 -v mediawiki:/var/www/mediawiki --name mediawiki mediawiki
Even though Git and Diffutils are installed in the Dockerfile, Mediawiki will fail to detect them. This can be resolved by adding the following to the bottom of your
$wgDiff3=/usr/bin/diff3 $wgDiff=/usr/bin/diff $wgGitBin=/usr/bin/git
Huge credit to both nickstenning (dockerfiles) and ngineered (nginx-php-fpm). My Mediawiki dockerfile is the result of pouring over both of their works and combining the best of both, along with some of my own.