gecko-dev/taskcluster/docs
Gregory Szorc fc3f70b542 Bug 1288567 - Add special Dockerfile syntax to add arbitrary files to context; r=dustin
A limitation of traditional docker build context generation is it
only includes files from the same directory as the Dockerfile. When
repositories have multiple, related Dockerfiles, this limitation
results file duplication or putting all Dockerfiles in the same
directory (which isn't feasible for mozilla-central since they would
need to be in the root directory).

This commit enhances Dockerfiles to allow *any* file from the
repository checkout to be ADDed to the docker build context.

Using the syntax "# %include <path>" you are able to include paths
or directories (relative from the top source directory root) in the
generated context archive. Files add this way are available under the
"topsrcdir/" path and can be ADDed to Docker images.

Since context archive generation is deterministic and the hash of
the resulting archive is used to determine when images need to be
rebuilt, any extra included file that changes will change the hash
of the context archive and force image regeneration.

Basic tests for the new feature have been added.

MozReview-Commit-ID: 4hPZesJuGQV

--HG--
extra : rebase_source : 99fae9fe82102126fbee879c134981047bb4a601
2016-07-21 16:51:30 -07:00
..
attributes.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00
docker-images.rst Bug 1288567 - Add special Dockerfile syntax to add arbitrary files to context; r=dustin 2016-07-21 16:51:30 -07:00
how-tos.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00
index.rst Bug 1288567 - Add special Dockerfile syntax to add arbitrary files to context; r=dustin 2016-07-21 16:51:30 -07:00
kinds.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00
parameters.rst Bug 1280129 - Update tasks to use v2 treeherder routes r=dustin 2016-06-14 12:56:25 -05:00
taskgraph.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00
transforms.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00
yaml-templates.rst Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown 2016-07-11 23:27:14 +00:00