安装前置条件
| 依赖 | 版本及安装命令 |
|---|---|
| CentOS版本 | CentOS 7 |
| Docker版本 | >1.10 |
| epel-release | yum install epel-release |
| rpm-python | yum install rpm-python |
| dpkg | yum install dpkg |
| python-pip | yum install python-pip |
安装Anchore
# pip install anchore

确认版本
# anchore --version
初期化Anchore的Database
# anchore feeds sync

镜像准备
# docker images

对镜像进行分析
# anchore analyze --image docker.io/centos:latest --imagetype base

生成报告
# anchore gate --image docker.io/centos:latest

确认CVE
# anchore query --image docker.io/centos:latest cve-scan all

