【发布时间】: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