User:Montehurd/mediawiki-docker-basic-installations

I'm using this page to document experimentation with the new docker bits in Mediawiki core.

How to download, install and run a basic MediaWiki instance, from scratch
These instructions are intended for someone who has no previous MediaWiki experience, who is interested in getting a basic instance of MediaWiki running on their local machine.

Steps tested on macOS - mileage may vary on other platforms
The following steps work to very quickly fetch, install and run a basic MediaWiki instance, from scratch, based on the instructions found here.

These steps assume you do not already have a "~/mediawiki" folder on your system, and that you do not already have a service running on port 8080.

Step 1:

Install Docker and Docker Compose:

https://docs.docker.com/install/

https://docs.docker.com/compose/install/

Step 2:

Open Terminal (press Command-Spacebar to open Spotlight Search and type "terminal.app", and press return) and paste the following into the terminal window and press return.

cd ~ git clone https://github.com/wikimedia/mediawiki.git mediawiki --depth=1 git clone https://github.com/wikimedia/mediawiki-skins-Vector.git mediawiki/skins/Vector --depth=1 cd mediawiki echo "MW_DOCKER_PORT=8080 MW_DOCKER_UID=$(id -u) MW_DOCKER_GID=$(id -g) MW_SCRIPT_PATH=/ MW_SERVER=http://localhost:8080 MEDIAWIKI_USER=Admin MEDIAWIKI_PASSWORD=dockerpass XDEBUG_CONFIG=''" > .env docker-compose up -d docker-compose exec mediawiki composer update docker-compose exec mediawiki /bin/bash /docker/install.sh open "http://localhost:8080/index.php?title=Special:Version"

Installation should take between 5 and 10 minutes. When installation completes, if all goes well, a Safari window will open displaying the local Mediawiki installation's "Special:Version" page.