From b948befb14cae810febf3702408178457ac4fbed Mon Sep 17 00:00:00 2001 From: Athar Hameed Date: Thu, 22 Mar 2018 11:41:34 -0400 Subject: Fix review points --- doc/ci/docker/using_docker_build.md | 13 +++++++------ 1 file 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 -- cgit v1.2.1