gecko-dev/testing/docker
jlal@mozilla.com 2eeb8f8030 Bug 1132348 - Add missing executable for decision tasks from builder r=me a=taskcluster-only
--HG--
extra : rebase_source : 0386e7939bef58c49c0704997d1bccd643587899
2015-02-11 21:22:45 -08:00
..
b2g-build Bug 1129143 - Upgrade tc-vcs and fix related emulator building issues r=wcosta 2015-02-05 12:15:44 -08:00
base-build Bug 1122598: Refactor testing/docker to support Android; r=wcosta 2015-01-21 10:45:34 -05:00
base-test Bug 1103031 - switch over to using base-test and base-build images r=lightsofapollo 2014-11-26 10:11:40 -08:00
builder Bug 1132348 - Add missing executable for decision tasks from builder r=me a=taskcluster-only 2015-02-11 21:22:45 -08:00
decision Bug 1105439 - Part 9 Finalize decision task and simplify emulator caching logic r=wcosta, garndt 2014-12-04 22:33:01 -08:00
phone-builder Bug 1130327: Update phone-builder to use builder image 0.2.6. 2015-02-10 17:36:18 -02:00
tester Bug 1130778 - Update tc-vcs 2.20 to ensure use of git.mo mirror of repo r=me a=taskcluster-only 2015-02-09 23:39:50 -08:00
README.md Bug 1122598: Refactor testing/docker to support Android; r=wcosta 2015-01-21 10:45:34 -05:00
REGISTRY
build.sh Bug 1122598: Refactor testing/docker to support Android; r=wcosta 2015-01-21 10:45:34 -05:00

README.md

Docker Images for use in TaskCluster

This folder contains various docker images used in taskcluster as well as other misc docker images which may be useful for hacking on gecko.

Organization

Each folder describes a single docker image. These images depend on one another, as described in the FROM line at the top of the Dockerfile in each folder. Each image has a version, given by its VERSION file. This should be bumped when any changes are made that will be deployed into taskcluster. Then, older tasks which were designed to run on an older version of the image can still be executed in taskcluster, while new tasks can use the new version.

Each image also has a REGISTRY, defaulting to the REGISTRY in this directory, and specifying the image registry to which the completed image should be uploaded.

Building images

Generally images can be pulled from the registry rather then build locally, but for developing new images its often helpful to hack on them locally.

To build an image, invoke build.sh with the name of the folder (without a trailing slash):

./build.sh base

This is a tiny wrapper around building the docker images via docker build -t $REGISTRY/$FOLDER:$FOLDER_VERSION

On completion, build.sh gives a command to upload the image to the registry, but this is not necessary until the image is ready for production usage. Docker will successfully find the local, tagged image while you continue to hack on the image definitions.

Adding a new image

The docker image primitives are very basic building block for constructing an "image" but generally don't help much with tagging it for deployment so we have a wrapper (./build.sh) which adds some sugar to help with tagging/versioning... Each folder should look something like this:

  - your_amazing_image/
    - your_amazing_image/Dockerfile: Standard docker file syntax
    - your_amazing_image/VERSION: The version of the docker file
      (required* used during tagging)
    - your_amazing_image/REGISTRY: Override default registry
      (useful for secret registries)

Conventions

In some image folders you will see .env files these can be used in conjunction with the --env-file flag in docker to provide a environment with the given environment variables. These are primarily for convenience when manually hacking on the images.

You will also see a system-setup.sh script used to build the image. Do not replicate this technique - prefer to include the commands and options directly in the Dockerfile.