summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAthar Hameed <atharh@gmail.com>2018-03-22 11:41:34 -0400
committerAthar Hameed <atharh@gmail.com>2018-03-22 11:41:34 -0400
commitb948befb14cae810febf3702408178457ac4fbed (patch)
tree4a17c3b06eeff0186e0c8197a9521aaa0a07e7dc
parent65ff165588f4adde84e46c2d0389bfe0e19775be (diff)
downloadgitlab-ce-docs-ci-docker-build-cache.tar.gz
-rw-r--r--doc/ci/docker/using_docker_build.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md
index dc8e9f335b2..9b5f024fbdb 100644
--- a/doc/ci/docker/using_docker_build.md
+++ b/doc/ci/docker/using_docker_build.md
@@ -262,18 +262,19 @@ aware of the following implications:
## Docker layer caching: Making docker-in-docker builds faster
When using docker-in-docker, Docker will download all layers of your image every time you create a
-build. Recent versions of Docker can use a pre-existing image as a cache during the `docker build`
-step, considerably speeding up the build process.
+build. Recent versions of Docker (Docker 1.13 and above) can use a pre-existing image as a cache
+during the `docker build` step, considerably speeding up the build process.
### How Docker caching works
-When running `docker build`, each line in `Dockerfile` results in a layer. These layers are kept
+When running `docker build`, each command in `Dockerfile` results in a layer. These layers are kept
around as a cache and can be reused if there haven't been any changes. Change in one layer causes
all subsequent layers to be recreated.
-Starting with Docker 1.13, the `docker build` command introduced a new argument `--cache-from`,
-using which we can specify a tagged image as a cache source. We can specify multiple images as a
-cache source by using multiple `--cache-from` arguments.
+We can specify a tagged image to be used as a cache source for the `docker build` command by
+using the `--cache-from` argument. We can specify multiple images as a cache source by using
+multiple `--cache-from` arguments. Please note that any image that's used with the `--cache-from`
+argument must first be pulled (using `docker pull`) before it can be used as a cache source.
### Using Docker caching