20年营销型网站设计公司 提高你的知名度 提高业绩量

北京网站优化Docker安全设置教程之镜像安全设置

发布时间:2023-05-30 09:36:59



沧州佳恩网络科技有限公司专注河北网站制作,网站优化,河北站长工具,河北网站推广等企业互联网业务,根据用户的实际情况,充分考虑各种网络资源的特点。

Clair

  来自CoreOS的 Clair 实现了一个restful的服务,同样是周期性的同步各种漏洞源信息,然后客户端可以将镜像传给Clair,然后Clair解析出镜像里的软件包,如果软件包包含漏洞的话, Clair可以调webhook发送通知到外部服务。我的理解Clair并不是一个完备的解决方案,但是你可以很容易的将Clair集成到自己的工作流中去。可惜这个东西目前还比较小众,

安装配置   yum install epel-release && yum install -y python-pip rpm-python dpkg pip install anchore anchore feeds sync

实际操作

# 分析本地的镜像 anchore analyze --image ubuntu:latest --imagetype base # 分析结果生成报告 anchore gate --image ubuntu:latest 报告中会显示哪个地方有漏洞,已经漏洞对应的链接。

准备sample配置文件   mkdir clair/clair_config/ curl -L https://raw.githubusercontent.com/coreos/clair/master/config.example.yaml -o clair/clair_config/config.yaml 修改数据库配置 vi clair/clair_config/config.yaml   source: host=postgres port=5432 user=postgres password=password sslmode=disable statement_timeout=60000 准备compose file   cd clair curl -L https://raw.githubusercontent.com/coreos/clair/master/docker-compose.yml -o docker-compose.yml 启动   docker-compose up -d     刚才我也提到,Clair只是提供了api接口,所以使用起来并不是那么方便,我在Github上找到了clairctl这个客户端工具,可以方便的测试Clair的功能   安装clairctl   go get github.com/jgsqware/clairctl cd ~/go/src/github.com/jgsqware/clairctl go build cp clairctl /usr/local/bin/ 分析镜像   检查是否已经连接上Clair   ~ clairctl health   Clair: ✔ 将镜像上传到Clair   ~ clairctl push -l mongo mongo:latest has been pushed to Clair 分析镜像中的漏洞   ~ clairctl analyze mongo   Image: docker.io/mongo:latest  11 layers found     ➜ Analysis [sha256:bb0dc] found 36 vulnerabilities.   ➜ Analysis [sha256:2369c] found 36 vulnerabilities.   ➜ Analysis [sha256:ef2c7] found 36 vulnerabilities.   ➜ Analysis [sha256:9504d] found 36 vulnerabilities.   ➜ Analysis [sha256:7584b] found 34 vulnerabilities.   ➜ Analysis [sha256:081d7] found 34 vulnerabilities.   ➜ Analysis [sha256:b394c] found 34 vulnerabilities.   ➜ Analysis [sha256:a647e] found 34 vulnerabilities.   ➜ Analysis [sha256:90df9] found 34 vulnerabilities.   ➜ Analysis [sha256:b03f9] found 34 vulnerabilities.   ➜ Analysis [sha256:e45e8] found 34 vulnerabilities. 生成漏洞报告   ~ clairctl report mongo HTML report at reports/html/analysis-mongo-latest.html 其他   Open Source Solution   OpenSCAP/atomic scan Commercial Solution
为什么选择我们:沧州佳恩网络科技有限公司核心员工来自阿里巴巴、腾讯等,作为阿里云,腾讯云百度云,金山云,华为云重要的合作伙伴,专注于为企业用户提供云计算及云计算的解决方案。总部设在沧州。做为一家综合性方案商,沧州佳恩网络向各行业用户提供基于云计算的各种解决方案。为用户获得服务的同时,秉承专业规划、周到服务的服务理念,根据用户的实际情况,充分考虑各种网络资源的特点及功效,为用户量身定做一套适合于其实际应用需求的网络应用方案。帮助用户利用互联网的力量展开新的营销方式,并大大缩短了项目实施周期。

上一篇:北京网站优化MySQL数据库出错代码汇总

下一篇:北京网站优化造成服务器带宽跑满的原因

返回列表
中小企业网站建设
我们做具性价比的服务
 

更多 +联系我们

咨询电话:0317-3741708

业务QQ:  44963430E-mail:yflabc@163.com

客服0317-3741708

渠道合作QQ44963430

我们的经营

沧州佳恩网络科技有限公司,是一家专业从事网站建设、 品牌设计、产品拍摄的企业。公司汇集了网站建设,品牌设计,电商设计,为企业提供一站式的服务, 公司各类专业人才,均在各自领域工作5年以上,有着丰富的经验!
有这样一群人,
他们愿意把自己的全部能量挥洒在这里,愿意把对事业的美好憧憬寄托在这里,
愿意忘记时间的流转并把对生活的热情融入这里。这里没有沉闷的交流,没有超越忍耐的合作,
没有失去自由的畅想,没有无法逾越的隔阂;
有的是心照不宣,轻松和谐;有的是放纵思绪,丰富且自得。