summaryrefslogtreecommitdiff
path: root/docs/reference/commandline/save.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/commandline/save.md')
-rw-r--r--docs/reference/commandline/save.md39
1 files changed, 28 insertions, 11 deletions
diff --git a/docs/reference/commandline/save.md b/docs/reference/commandline/save.md
index 88a5fed103..cba7385e11 100644
--- a/docs/reference/commandline/save.md
+++ b/docs/reference/commandline/save.md
@@ -25,21 +25,38 @@ Options:
-o, --output string Write to a file, instead of STDOUT
```
+## Description
+
Produces a tarred repository to the standard output stream.
Contains all parent layers, and all tags + versions, or specified `repo:tag`, for
each argument provided.
-It is used to create a backup that can then be used with `docker load`
+## Examples
+
+### Create a backup that can then be used with `docker load`.
+
+```bash
+$ docker save busybox > busybox.tar
+
+$ ls -sh busybox.tar
+
+2.7M busybox.tar
+
+$ docker save --output busybox.tar busybox
- $ docker save busybox > busybox.tar
- $ ls -sh busybox.tar
- 2.7M busybox.tar
- $ docker save --output busybox.tar busybox
- $ ls -sh busybox.tar
- 2.7M busybox.tar
- $ docker save -o fedora-all.tar fedora
- $ docker save -o fedora-latest.tar fedora:latest
+$ ls -sh busybox.tar
-It is even useful to cherry-pick particular tags of an image repository
+2.7M busybox.tar
- $ docker save -o ubuntu.tar ubuntu:lucid ubuntu:saucy
+$ docker save -o fedora-all.tar fedora
+
+$ docker save -o fedora-latest.tar fedora:latest
+```
+
+### Cherry-pick particular tags
+
+You can even cherry-pick particular tags of an image repository.
+
+```bash
+$ docker save -o ubuntu.tar ubuntu:lucid ubuntu:saucy
+```