扫描镜像
# 本地镜像
./veinmind-runner scan image [docker/containerd]:reference
当容器运行时类型未指定的情况下默认会依次尝试docker,containerd
# 远程仓库镜像
./veinmind-runner scan image registry-image:reference
若远程仓库需要认证,需使用 -c 参数指定 toml 格式的认证信息文件
例如:
#扫描 docker.io 的 nginx 镜像 (所有 tag)
./veinmind-runner scan image registry-image:nginx
#扫描 docker.io 的 bitnami/nginx 镜像 (所有 tag)
./veinmind-runner scan image registry-image:bitnami/nginx
#扫描 registry.example.com 私有仓库下的 registry.example.com/library/ubuntu:latest 镜像
./veinmind-runner scan image -c auth.toml registry-image:registry.example.com/library/ubuntu:latest
#扫描 registry.example.com 私有仓库下的所有镜像
./veinmind-runner scan image -c auth.toml registry:registry.example.com
#基于给定正则扫描 registry.example.com 私有仓库下的所有镜像
./veinmind-runner scan image -c auth.toml --filter "nginx$" registry:registry.example.com
auth.toml
的格式如下, registry
代表仓库地址, username
代表用户名, password
代表密码
[[auths]]
registry = "index.docker.io"
username = "admin"
password = "password"
[[auths]]
registry = "registry.private.net"
username = "admin"
password = "password"