import 导入已有的image,本地已有的image或远程的
Usage: docker import URL|-[REPOSITORY[:TAG]]Create an empty filesystem image andimport the contents of the tarball (.tar,.tar.gz,.tgz,.bzip,.tar.xz,.txz)into it,then optionally tag it.
支持压缩包 (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)
Examples
导入远程的包:
This will create a new untagged image.
$ sudo docker import http://example.com/exampleimage.tgz
导入本地文件:
Import to docker via pipe and STDIN
.
$ cat exampleimage.tgz | sudo docker import- exampleimagelocal:new
导入本地目录:
$ sudo tar -c .| sudo docker import- exampleimagedir
Note the sudo
如果权限不足一定要记得给权限