From 1a8bdcd36fc538c908c56d00de34e6182e2ad1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?To=CC=83nis=20Tiigi?= Date: Thu, 22 Sep 2016 14:38:00 -0700 Subject: [PATCH] Implement build cache based on history array Based on work by KJ Tsanaktsidis Signed-off-by: Tonis Tiigi Signed-off-by: KJ Tsanaktsidis --- docs/reference/builder.md | 7 +++++++ docs/reference/commandline/build.md | 1 + 2 files changed, 8 insertions(+) diff --git a/docs/reference/builder.md b/docs/reference/builder.md index a4352bb914..bef2b85535 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -106,6 +106,13 @@ the `Using cache` message in the console output. ---> 7ea8aef582cc Successfully built 7ea8aef582cc +Build cache is only used from images that have a local parent chain. This means +that these images were created by previous builds or the whole chain of images +was loaded with `docker load`. If you wish to use build cache of a specific +image you can specify it with `--cache-from` option. Images specified with +`--cache-from` do not need to have a parent chain and may be pulled from other +registries. + When you're done with your build, you're ready to look into [*Pushing a repository to its registry*](../tutorials/dockerrepos.md#contributing-to-docker-hub). diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 0f700c7a20..68e39dfd77 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -17,6 +17,7 @@ Build an image from a Dockerfile Options: --build-arg value Set build-time variables (default []) + --cache-from value Images to consider as cache sources (default []) --cgroup-parent string Optional parent cgroup for the container --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota