skopeo 操作镜像是非常方便的。
安装
# centos
yum installskopeo
其他系统见 安装文档
使用
命令选项
# skopeo --help
NAME:
skopeo - Various operations with container images and container image registries
USAGE:
skopeo [global options] command [commandoptions] [arguments...]
VERSION:
0.1.37
COMMANDS:
copy Copy an IMAGE-NAME from one location to another
inspect Inspect image IMAGE-NAME
delete Delete image IMAGE-NAME
manifest-digest Compute a manifest digest of a file
standalone-sign Create a signature using localfiles
standalone-verify Verify a signature using localfiles
help, h Shows a list of commands or helpforone commandGLOBAL OPTIONS:
--debug enabledebug output
--policy value Path to a trust policy file
--insecure-policy run the tool without any policy check
--registries.d DIR use registry configuration files inDIR (e.g. forcontainer signature storage)
--override-arch ARCH use ARCH instead of the architecture of the machine forchoosing images
--override-os OS use OS instead of the running OS forchoosing images
--command-timeout value timeoutforthe commandexecution (default: 0s)
--help, -h show help
--version, -v print the version
获取镜像的信息
skopeo 可以在不用下载镜像的情况下,获取镜像信息
# skopeo inspect docker://docker.io/centos
{