Docker扫描工具之Anchore

安装前置条件

依赖版本及安装命令
CentOS版本CentOS 7
Docker版本>1.10
epel-releaseyum install epel-release
rpm-pythonyum install rpm-python
dpkgyum install dpkg
python-pipyum install python-pip

安装Anchore

# pip install anchore
Docker扫描工具之Anchore

确认版本

# anchore --version

初期化Anchore的Database

# anchore feeds sync
Docker扫描工具之Anchore

镜像准备

# docker images
Docker扫描工具之Anchore

对镜像进行分析

# anchore analyze --image docker.io/centos:latest --imagetype base
Docker扫描工具之Anchore

生成报告

# anchore gate --image docker.io/centos:latest
Docker扫描工具之Anchore

确认CVE

# anchore query --image docker.io/centos:latest cve-scan all
Docker扫描工具之Anchore

参考
https://blog.csdn.net/liumiaocn/article/details/76732894