mirror of https://github.com/docker/cli.git
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 <joseph.a.kern@gmail.com> checkpoint before edits on the export functions Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> Added an --output flag to docker export and created tests. Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> White space cleanup. Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> Docker-DCO-1.1-Signed-off-by: Joseph Kern <jkern@semafour.net> (github: jfrazelle) checkpoint before edits on the export functions Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> White space cleanup. Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> Added text to reflect a new output option for the export command. Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> Whitespace clean up Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com> Added man page documentation for the new --output flag in export Signed-off-by: Joseph Kern <joseph.a.kern@gmail.com>
This commit is contained in:
parent
f1cb33631f
commit
4aa65f26aa
|
@ -1068,14 +1068,22 @@ This will create a new Bash session in the container `ubuntu_bash`.
|
|||
|
||||
## export
|
||||
|
||||
Usage: docker export CONTAINER
|
||||
Usage: docker export [OPTIONS] CONTAINER
|
||||
|
||||
Export the contents of a filesystem as a tar archive to STDOUT
|
||||
Export the contents of a filesystem to a tar archive (streamed to STDOUT by default)
|
||||
|
||||
For example:
|
||||
-o, --output="" Write to a file, instead of STDOUT
|
||||
|
||||
Produces a tarred repository to the standard output stream.
|
||||
|
||||
For example:
|
||||
|
||||
$ sudo docker export red_panda > latest.tar
|
||||
|
||||
Or
|
||||
|
||||
$ sudo docker export --output="latest.tar" red_panda
|
||||
|
||||
> **Note:**
|
||||
> `docker export` does not export the contents of volumes associated with the
|
||||
> container. If a volume is mounted on top of an existing directory in the
|
||||
|
|
Loading…
Reference in New Issue