go get github.com/DockerContainerService/image-save
cd ${GOPATH}/github.com/DockerContainerService/image-save
make all
Get usage information
[root@tencent ~]# ./imsave -h
Save docker image to local without docker daemon
Complete documentation is available at https://github.com/DockerContainerService/image-save
Usage:
imsave [image] [flags]
Flags:
--arch string the architecture of the image you want to save
-d, --debug enable debug mode
-h, --help help for imsave
-i, --insecure whether the registry is using http
-m, --mirror string use a mirror repository
--os string the osFilter of the image you want to save
-o, --output string output file
-p, --passwd string password of the registry
-u, --user string username of the registry
-v, --version version for imsave
Usage example
[root@tencent ~]# ./imsave alpine
Using default tag: latest
Using architecture: amd64
[f56be85fc22e] ... done! [3.37MB in 2.913s; 1.13MB/s]
Output file: alpine_latest.tgz