Public | Automated Build

Last pushed: 10 hours ago
Short Description
Full Description

RSpec on Ubuntu 16.04 LTS (Xenial Xerus)

Very simple image to use as the environment for running RSpec tests against newly built Docker images.

Firefox, Selenium and watir are included to allows the rspec tests to perform testing via a web browser. This image is currently pinned to Firefox v45 due to a compatibility issue with with the headless gem for watir and later versions of Firefox.


Run the this image with the following:

  1. The docker soccket mounted at /var/run/docker.sock
  2. A volume containing the tests you want to run (default mount point of /mnt/)
  3. The command to run, i.e. rspec

Example - generic rspec usage


docker run -i -t --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${FOLDER_WITH_TESTS}:/mnt/ ${RSPEC_IMAGE} ${CMD_TO_RUN}

Example - using Makefile from this repository


docker run -i -t --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${FOLDER_WITH_TESTS}:/mnt/ ${RSPEC_IMAGE} ${CMD_TO_RUN}

Building and testing

A simple Makefile is included for your convience. It assumes a linux environment with a docker socket avialable at /var/run/docker.sock

To build and test just run make.
You can also just make pull, make build and make test separately.

Please see the top of the Makefile for various variables which you may choose to customise. Variables may be passed as arguments, e.g. make IMAGE_NAME=bob or make build BUILD_ARGS="--rm --no-cache"

Modifying the tests

The tests depend on shared testing code found in its own git repository called drone-tests.

To use a different tests repository set the TESTS_REPO variable to the git URL for the alternative repository. e.g. make TESTS_REPO=

To use a locally modified copy of the tests repository set the TESTS_LOCAL variable to the absolute path of where it is located. This variable will override the TESTS_REPO variable. e.g. make TESTS_LOCAL=/tmp/github/1and1internet/drone-tests/

Docker Pull Command
Source Repository

Comments (0)