|
...
|
...
|
@@ -8,6 +8,33 @@
|
|
8
|
8
|
|
|
9
|
9
|
::
|
|
10
|
10
|
|
|
11
|
|
- Usage: docker import [OPTIONS] URL|- [REPOSITORY [TAG]]
|
|
|
11
|
+ Usage: docker import URL|- [REPOSITORY [TAG]]
|
|
12
|
12
|
|
|
13
|
13
|
Create a new filesystem image from the contents of a tarball
|
|
|
14
|
+
|
|
|
15
|
+At this time, the URL must start with ``http`` and point to a single file archive (.tar, .tar.gz, .bzip)
|
|
|
16
|
+containing a root filesystem. If you would like to import from a local directory or archive,
|
|
|
17
|
+you can use the ``-`` parameter to take the data from standard in.
|
|
|
18
|
+
|
|
|
19
|
+Examples
|
|
|
20
|
+--------
|
|
|
21
|
+
|
|
|
22
|
+Import from a remote location
|
|
|
23
|
+.............................
|
|
|
24
|
+
|
|
|
25
|
+``$ docker import http://example.com/exampleimage.tgz exampleimagerepo``
|
|
|
26
|
+
|
|
|
27
|
+Import from a local file
|
|
|
28
|
+........................
|
|
|
29
|
+
|
|
|
30
|
+Import to docker via pipe and standard in
|
|
|
31
|
+
|
|
|
32
|
+``$ cat exampleimage.tgz | docker import - exampleimagelocal``
|
|
|
33
|
+
|
|
|
34
|
+Import from a local directory
|
|
|
35
|
+.............................
|
|
|
36
|
+
|
|
|
37
|
+``$ sudo tar -c . | docker import - exampleimagedir``
|
|
|
38
|
+
|
|
|
39
|
+Note the ``sudo`` in this example -- you must preserve the ownership of the files (especially root ownership)
|
|
|
40
|
+during the archiving with tar. If you are not root (or sudo) when you tar, then the ownerships might not get preserved.
|