forked from moby/moby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified
docker export
to allow an --output flag
Copied code from CmdSave into CmdExport. This should work, not an expert in the API calls being made. But it does make more sense to have a consistent export/save flag. Signed-off-by: Joseph Kern <[email protected]> checkpoint before edits on the export functions Signed-off-by: Joseph Kern <[email protected]> Added an --output flag to docker export and created tests. Signed-off-by: Joseph Kern <[email protected]> White space cleanup. Signed-off-by: Joseph Kern <[email protected]> Docker-DCO-1.1-Signed-off-by: Joseph Kern <[email protected]> (github: jfrazelle) checkpoint before edits on the export functions Signed-off-by: Joseph Kern <[email protected]> White space cleanup. Signed-off-by: Joseph Kern <[email protected]> Added text to reflect a new output option for the export command. Signed-off-by: Joseph Kern <[email protected]> Whitespace clean up Signed-off-by: Joseph Kern <[email protected]> Added man page documentation for the new --output flag in export Signed-off-by: Joseph Kern <[email protected]>
- Loading branch information
1 parent
f4f10cf
commit 5ff122f
Showing
4 changed files
with
100 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,24 @@ Export the contents of a container's filesystem using the full or shortened | |
container ID or container name. The output is exported to STDOUT and can be | ||
redirected to a tar file. | ||
|
||
Stream to a file instead of STDOUT by using **-o**. | ||
|
||
# OPTIONS | ||
**--help** | ||
Print usage statement | ||
**-o**, **--output**="" | ||
Write to a file, instead of STDOUT | ||
|
||
# EXAMPLES | ||
Export the contents of the container called angry_bell to a tar file | ||
called test.tar: | ||
called angry_bell.tar: | ||
|
||
# docker export angry_bell > test.tar | ||
# ls *.tar | ||
test.tar | ||
# docker export angry_bell > angry_bell.tar | ||
# docker export --output=angry_bell-latest.tar angry_bell | ||
# ls -sh angry_bell.tar | ||
321M angry_bell.tar | ||
# ls -sh angry_bell-latest.tar | ||
321M angry_bell-latest.tar | ||
|
||
# See also | ||
**docker-import(1)** to create an empty filesystem image | ||
|
@@ -34,3 +41,4 @@ and import the contents of the tarball into it, then optionally tag it. | |
April 2014, Originally compiled by William Henry (whenry at redhat dot com) | ||
based on docker.com source material and internal work. | ||
June 2014, updated by Sven Dowideit <[email protected]> | ||
Janurary 2015, updated by Joseph Kern (josephakern at gmail dot com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters