安裝前置條件
| 依賴 | 版本及安裝命令 |
|---|---|
| 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

