Drupal/WordPress Environment w/ Docker

Drupal/WordPress Environment w/ Docker

This Tutorial assumes your have Docker Toolbox installed and fully operational.

Within Docker Quickstart Terminal get a copy of the latest MySQL image:

$docker pull mysql

Start your MySQL container running:

$docker run --name mysql -e MYSQLROOTPASSWORD=example -d mysql

Get a WordPress image:

$docker pull wordpress

Get your WordPress container running and link to your mysql container:

$docker run --name wordpress --link mysql:mysql -p 8080:80 -e MYSQLUSER=root -e MYSQLPASSWORD=example -d wordpress

Get a Drupal image:

$docker pull drupal

Get your Drupal container running and link to your mysql container:

$docker run --name drupal --link mysql:mysql -p 8081:80 -e MYSQLUSER=root -e MYSQLPASSWORD=example -d drupal

You should now have WordPress and Drupal running and fully operational. Just specify :8080 (WordPress) and :8081 (Drupal) in order to swap between the two CMS systems.