summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html
new repository
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html')
-rw-r--r--devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html
new file mode 100644
index 00000000..51dbc313
--- /dev/null
+++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fsave%2Findex.html
@@ -0,0 +1,26 @@
+<h1>docker save</h1> <p><br></p> <p>Save one or more images to a tar archive (streamed to STDOUT by default)</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker save [OPTIONS] IMAGE [IMAGE...]
+</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">Produces a tarred repository to the standard output stream. Contains all parent layers, and all tags + versions, or specified <code class="language-plaintext highlighter-rouge">repo:tag</code>, for each argument provided.</p> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td>
+<code class="language-plaintext highlighter-rouge">--output</code> , <code class="language-plaintext highlighter-rouge">-o</code>
+</td> <td></td> <td>Write to a file, instead of STDOUT</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="create-a-backup-that-can-then-be-used-with-docker-load">Create a backup that can then be used with <code class="language-plaintext highlighter-rouge">docker load</code>.</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker save busybox &gt; 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
+</pre></div> <h3 id="save-an-image-to-a-targz-file-using-gzip">Save an image to a tar.gz file using gzip</h3> <p>You can use gzip to save the image file and make the backup smaller.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker save myimage:latest | gzip &gt; myimage_latest.tar.gz
+</pre></div> <h3 id="cherry-pick-particular-tags">Cherry-pick particular tags</h3> <p>You can even cherry-pick particular tags of an image repository.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker save -o ubuntu.tar ubuntu:lucid ubuntu:saucy
+</pre></div> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
+ <a href="https://docs.docker.com/engine/reference/commandline/save/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/save/</a>
+ </p>
+</div>