Drulenium testing with Docker
Quick and easy to use Docker container for your local Drulenium testing. It contains a LAMP stack and an SSH server, along with an up to date version of Drush. It is based on Debian Jessie.
Using graphical interface through Kitematic
Clone the repository locally and build it:
git clone firstname.lastname@example.org:TechNikh/docker-drulenium.git cd docker-drulenium docker-compose up
Notice that there are several branches. The
master branch always refers to the current recommended major Drulenium version.
docker-compose upGo to http://[my-docer-machine-ip-address]:8080/
- You can get the IP by running the command
- Log into the Drupal site as admin with username & password ->
- Configure Drulenium module settings at http://[my-docer-machine-ip-address]:8080/drulenium/settings/local with selenium Host URL like http://[my-docer-machine-ip-address]:4444/wd/hub
- Choose the local server as Snapshot server at http://[my-docer-machine-ip-address]:8080/drulenium/settings
- And run your tests at http://[my-docer-machine-ip-address]:8080/drulenium/vr
This image contains:
- Apache 2.4
- MySQL 5.5
- PHP 5.6
- Drush 8
- Drupal 7
When launching, the container will contain a fully-installed, ready to use Drupal site.
- 80 (Apache)
- 22 (SSH)
- 3306 (MySQL)
Using Drush aliases, you can directly execute Drush commands locally and have them be executed inside the container. Create a new aliases file in your home directory and add the following:
# ~/.drush/docker.aliases.drushrc.php <?php $aliases['docker-drulenium'] = array( 'root' => '/var/www', 'remote-user' => 'root', 'remote-host' => 'localhost', 'ssh-options' => '-p 8022', // Or any other port you specify when running the container );
Next, if you do not wish to type the root password everytime you run a Drush command, copy the content of your local SSH public key (usually
~/.ssh/id_rsa.pub; read here on how to generate one if you don't have it). SSH into the running container:
# If you forwarded another port than 8022, change accordingly. # Password is "root". ssh root@localhost -p 8022
Once you're logged in, add the contents of your
id_rsa.pub file to
You should now be able to call:
drush @docker.docker-drulenium cc all
This will clear the cache of your Drupal site. All other commands will function as well.
MySQL and PHPMyAdmin
PHPMyAdmin is available at
/phpmyadmin. The MySQL port
3306 is exposed. The root account for MySQL is
root (no password).