From 730417f46f6c9ae4e9b96bd9c984b482a3cf8b18 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Sun, 23 Feb 2014 11:32:12 -0500 Subject: [PATCH] make docker build -rm=true default #4292 Docker-DCO-1.1-Signed-off-by: Brian Goff (github: cpuguy83) --- docs/sources/reference/commandline/cli.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/sources/reference/commandline/cli.rst b/docs/sources/reference/commandline/cli.rst index b221f0de..35091836 100644 --- a/docs/sources/reference/commandline/cli.rst +++ b/docs/sources/reference/commandline/cli.rst @@ -185,11 +185,11 @@ Examples: Usage: docker build [OPTIONS] PATH | URL | - Build a new container image from the source code at PATH - -t, --time="": Repository name (and optionally a tag) to be applied + -t, --time="": Repository name (and optionally a tag) to be applied to the resulting image in case of success. -q, --quiet=false: Suppress the verbose output generated by the containers. --no-cache: Do not use the cache when building the image. - --rm: Remove intermediate containers after a successful build + --rm=true: Remove intermediate containers after a successful build The files at ``PATH`` or ``URL`` are called the "context" of the build. The build process may refer to any of the files in the context, for example when @@ -198,8 +198,6 @@ is given as ``URL``, then no context is set. When a Git repository is set as ``URL``, then the repository is used as the context. Git repositories are cloned with their submodules (`git clone --recursive`). -.. note:: ``docker build --rm`` does not affect the image cache which is used to accelerate builds, it only removes the duplicate writeable container layers. - .. _cli_build_examples: .. seealso:: :ref:`dockerbuilder`. @@ -209,7 +207,7 @@ Examples: .. code-block:: bash - $ sudo docker build --rm . + $ sudo docker build . Uploading context 10240 bytes Step 1 : FROM busybox Pulling repository busybox @@ -249,9 +247,8 @@ The transfer of context from the local machine to the Docker daemon is what the ``docker`` client means when you see the "Uploading context" message. -The ``--rm`` option tells Docker to remove the intermediate containers and -layers that were used to create each image layer. Doing so has no impact on -the image build cache. +If you wish to keep the intermediate containers after the build is complete, +you must use ``--rm=false``. This does not affect the build cache. .. code-block:: bash