【问题标题】:VMware Photon - Clair cannot scan Photon container vulnerability on vSphereVMware Photon - Clair 无法扫描 vSphere 上的 Photon 容器漏洞
【发布时间】:2019-09-17 21:34:39
【问题描述】:

问题:
Clair 无法扫描从 VMware vSphere 平台上的 Photon OS 构建的 Docker 映像。反过来,这会阻止在 vSphere 上正确完成漏洞扫描,从而阻止任何后续容器部署。**

背景
我正在使用 Docker 从 Windows Server 构建 Photon 映像,并推送到 vSphere 上托管的 VMware VCH。一切正常,我可以将映像推送到 VCH / vSphere,没有任何问题。

Dockerfile

FROM photon:3.0
RUN tdnf remove toybox -y
RUN tdnf install -y build-essential python3-setuptools python3-tools python3-pip python3-devel git 
RUN pip3 install --upgrade pip
RUN pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org flask
RUN pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org flask_restful
COPY . /app
WORKDIR /app
CMD ["python", "app.py"]

Powershell

# Build the image
docker build -t vchregistry.../myimage:latest .

# Push Image back to VIC (Registry)
docker push vchregistry.../myimage:latest

当我在 vSphere 上检查存储库时,我在漏洞日志中看到以下内容,表明扫描失败。

[INFO] Scanning Layer: xxxxx, path: http://registry:5000/..../photon-iso/blobs/sha256:xxxxx
[ERROR] [clair_job.go:101]: Failed to scan xxxxx: xxxxx, error: Unexpected status code: 422, text: {"Error":{"Message":"worker: OS and/or package manager are not supported"}}

此错误是 Photon 图像独有的。许多其他人,包括 Alpine,扫描和完成都很好。考虑到 VMware 开发了 vSphere 和 Photon,这很奇怪。

问题:
这个世界上是否有人知道我如何启用光子图像的 Clair 漏洞扫描?

【问题讨论】:

    标签: docker vmware vsphere photon


    【解决方案1】:

    答案是 Clair 不支持扫描 Photon 图像。虽然这在错误消息中很明显,但从 VMware 的角度来看,我很难理解 - 如果没有一些解决方法来扫描构建在他们自己的操作系统上的映像,我无法看到 VMware 创建像 vSphere 这样的平台创建的。不幸的是,情况就是这样……

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-28
      • 2021-09-16
      • 1970-01-01
      • 2022-01-01
      • 2013-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多