gecko-dev/testing/docker
Morgan Phillips 2437e80b6e Bug 1176961 - Image builds should fail if tc-vcs fails to install; r=dustin
--HG--
extra : rebase_source : c78d86b7e921d57361586f445aa8af86be63ddd4
2015-06-24 10:41:37 -07:00
..
b2g-build Bug 1165468 - Upgrade to git 2.4 r=garndt 2015-05-15 15:42:09 -07:00
base-build Bug 1122598: Refactor testing/docker to support Android; r=wcosta 2015-01-21 10:45:34 -05:00
base-test Bug 1151877 - Add buildbot freindly index routes for emulator-kk/ics r=me 2015-04-09 12:11:23 -07:00
builder Bug 1166073 - change docker registry to hub r=garndt 2015-05-18 14:43:24 -07:00
decision Bug 1119387 part 5: Update docker images. 2015-03-25 14:25:27 -03:00
desktop-build Bug 8623031 - Move desktop build logic to a container neutral location; r=dustin 2015-06-16 15:42:16 +02:00
desktop32-build Bug 1154827 - Add a base desktop 32 bit builder; r=dustin 2015-06-16 18:40:27 +02:00
phone-builder Bug 1171026: Fix exit code for phone-builder image. r=garndt a=garndt 2015-06-03 17:55:04 -03:00
tester Bug 1165488 - Update tester docker image. r=jlal 2015-05-28 16:43:04 -07:00
tester-device Bug 1172336 - Provide phone capabilities within payload instead of env variable r=wcosta 2015-06-07 11:39:18 -05:00
ubuntu-build Bug 1176961 - Image builds should fail if tc-vcs fails to install; r=dustin 2015-06-24 10:41:37 -07:00
ubuntu32-build Bug 1176960 - Fix broken tc-vcs install version; r=dustin 2015-06-24 10:34:30 -07: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.