mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add missing documentation to cli/import.md
PR #11907 added support for import using file (path), but it missed the update of cli/import.md. This fixes that. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
6b12d37ced
commit
3101941120
1 changed files with 12 additions and 5 deletions
|
@ -11,7 +11,7 @@ weight=1
|
||||||
|
|
||||||
# import
|
# import
|
||||||
|
|
||||||
Usage: docker import URL|- [REPOSITORY[:TAG]]
|
Usage: docker import file|URL|- [REPOSITORY[:TAG]]
|
||||||
|
|
||||||
Create an empty filesystem image and import the contents of the
|
Create an empty filesystem image and import the contents of the
|
||||||
tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then
|
tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then
|
||||||
|
@ -19,10 +19,13 @@ weight=1
|
||||||
|
|
||||||
-c, --change=[] Apply specified Dockerfile instructions while importing the image
|
-c, --change=[] Apply specified Dockerfile instructions while importing the image
|
||||||
|
|
||||||
URLs must start with `http` and point to a single file archive (.tar,
|
You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The
|
||||||
.tar.gz, .tgz, .bzip, .tar.xz, or .txz) containing a root filesystem. If
|
`URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)
|
||||||
you would like to import from a local directory or archive, you can use
|
containing a fileystem or to an individual file on the Docker host. If you
|
||||||
the `-` parameter to take the data from `STDIN`.
|
specify an archive, Docker untars it in the container relative to the `/`
|
||||||
|
(root). If you specify an individual file, you must specify the full path within
|
||||||
|
the host. To import from a remote location, specify a `URI` that begins with the
|
||||||
|
`http://` or `https://` protocol.
|
||||||
|
|
||||||
The `--change` option will apply `Dockerfile` instructions to the image
|
The `--change` option will apply `Dockerfile` instructions to the image
|
||||||
that is created.
|
that is created.
|
||||||
|
@ -43,6 +46,10 @@ Import to docker via pipe and `STDIN`.
|
||||||
|
|
||||||
$ cat exampleimage.tgz | docker import - exampleimagelocal:new
|
$ cat exampleimage.tgz | docker import - exampleimagelocal:new
|
||||||
|
|
||||||
|
Import to docker from a local archive.
|
||||||
|
|
||||||
|
$ docker import /path/to/exampleimage.tgz
|
||||||
|
|
||||||
**Import from a local directory:**
|
**Import from a local directory:**
|
||||||
|
|
||||||
$ sudo tar -c . | docker import - exampleimagedir
|
$ sudo tar -c . | docker import - exampleimagedir
|
||||||
|
|
Loading…
Reference in a new issue