From 2352760bdde1ec336a27138d508a49ae523d506d Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 19 Mar 2014 14:47:20 -0400 Subject: [PATCH] docker save: add and improve docs add usage examples for `docker save ...` Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) Upstream-commit: dd1f12fe6c63f3abf4a0e9a829ba436a4725adeb Component: cli --- .../sources/reference/commandline/cli.rst | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/components/cli/docs/sources/reference/commandline/cli.rst b/components/cli/docs/sources/reference/commandline/cli.rst index 757f3b239b..f4a5e0882f 100644 --- a/components/cli/docs/sources/reference/commandline/cli.rst +++ b/components/cli/docs/sources/reference/commandline/cli.rst @@ -1317,10 +1317,27 @@ This example shows 5 containers that might be set up to test a web application c :: - Usage: docker save image > repository.tar + Usage: docker save IMAGE + + Save an image to a tar archive (streamed to stdout by default) + + -o, --output="": Write to an file, instead of STDOUT + + +Produces a tarred repository to the standard output stream. +Contains all parent layers, and all tags + versions, or specified repo:tag. + +.. code-block:: bash + + $ sudo docker save busybox > busybox.tar + $ ls -sh b.tar + 2.7M b.tar + $ sudo docker save --output busybox.tar busybox + $ ls -sh b.tar + 2.7M b.tar + $ sudo docker save -o fedora-all.tar fedora + $ sudo docker save -o fedora-latest.tar fedora:latest - Streams a tarred repository to the standard output stream. - Contains all parent layers, and all tags + versions. .. _cli_search: