MDN’s new design is in Beta! A sneak peek:

NOTE: This is a draft

Docker makes it very easy to share the same environment as used in production.
Eventually we might not need this section and recommend everyone to start an interactive session in one of the AWS hosts/workers.

OS Support:

  • On Linux you can simply install docker and get going
  • On Mac you will need to install Virtualbox as well
  • On Windows you will need to install Virtualbox as well

Once you can run docker on your machine you can go to the next section.

The docker images

All docker images are defined in tree.

Note that you can create and modify the docker images and push them to try to get your changes tested (some images require you to involve the #taskcluster team). Read more about it in this blog post.

Get the steps to run locally

If you want to run tests on your local host via Docker you can do it by following these steps:

  1. First, you need to find the job you want on Treeherder and click on it
  2. Find the hyperlink "Inspect task" and click on it
  3. Select the "Task" tab on the top left
  4. Find below the section "Run Locally"

How to run tests with Docker on local host

NOTE: This will require a decent amount of bandwidth as the image is large.

Once you have docker properly set up and have got the steps on how to run the test locally follow these steps:

  1. If this is the first time trying to run docker and the tests you need to run need access to the graphic interfaceyou will need to do this:
    • sudo apt-get install v4l2loopback-dkms
    • sudo modprobe v4l2loopback
      • This will create a device under /dev/video*
      • You will need to run this command every time after you reboot
  2. Until we fix bug 1245254 you will need to modify the steps on how to run this locally
    • Before docker run step
      • NOTE: This last device is created with `sudo modprobe v4l2loopback`
      • last_device=`ls /dev/video* | tail -n 1`
    • Add to the 'docker run' step the following:
      • --device=$last_device:$last_device \
      • Remove the bash command from the last command
        • Otherwise it will start the container, excute it and end without letting you interact
      • Add -e START_VNC='true' \ if you would like to have VNC access to the container once it starts up
  3. Once you run docker run without the bash command, go ahead and do it now but add --no-run-tests at the end
    • This will download the build, mozharness and set everything up for you to run all the tests or individual tests
  4. Talk to armenzg at this point until bug 1245254 gets fixed
    • Or grab the "python2.7" command from the original logs to call Mozharness; use --run-tests
    • Or grab the command after "Running run-tests" in the original logs which shows the direct call to the harness (without Mozharness)
      • It might require setting some variables depending on the harness

Using Vagrant

NOTE: This will require a decent amount of bandwidth.

Unfortunately, some of the Firefox tests require video access and you might need to use Vagrant to help you if the section above did not help.

Make sure you install a recent version of Vagrant 1.8.1 worked for me (2016/02/25), otherwise, you might not be able to get past the beginning.

Follow these abridged steps (main docs):

  1. git clone
  2. cd docker-worker
  3. vagrant up # It can take few minutes the first time
  4. vagrant ssh

You can now go ahead and paste the commands from the section "Run Locally" without having to specify --device.

Document Tags and Contributors

 Contributors to this page: armenzg_mozilla
 Last updated by: armenzg_mozilla,