不依赖docker客户端导出docker镜像

此项目已经开源发布至GitHub https://github.com/DockerContainerService/image-save

1、支持linux、windows的amd64、arm64架构机器
2、支持不安装docker客户端情况下导出镜像tar包
3、支持公开镜像仓库/私有镜像仓库
4、支持多线程加速下载镜像
5、支持使用自定义镜像源加速下载镜像

大家在使用过程中如果发现问题,欢迎提Issue

使用方法如下:

imsave

Features

  • Support save docker image to local independent of docker daemon
  • Support for reading registry passwords in environment variables REGISTRY_PASSWORD
  • Support multithreading layer download
  • Support the use of registry mirror

Usage

Install image-save

you can download the latest binary release here

Install from source

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

你可能感兴趣的:(golang,golang,运维,docker,镜像)