无法使用Trivy扫描本地Docker图像

发布于 2025-01-30 09:35:17 字数 810 浏览 4 评论 0 原文

我正在尝试使用Trivy在本地Docker映像上使用Trivy来解决漏洞,但是我遇到了此错误。

docker run aquasec/trivy:0.28.0 image ansys/twindeployer/runtime-vnc:7005166

11s2022-05-19T22:22:02.519Z   FATAL   image scan error: scan error: unable to initialize a scanner: unable to initialize a docker scanner: 3 errors occurred:
    * unable to inspect the image (ansys/twindeployer/runtime-vnc:7005166): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    * unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
    * GET https://index.docker.io/v2/ansys/twindeployer/runtime-vnc/manifests/7005166: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:ansys/twindeployer/runtime-vnc Type:repository]]

I am trying to can for vulnerabilities using trivy on a local docker image, but i am getting this error.

docker run aquasec/trivy:0.28.0 image ansys/twindeployer/runtime-vnc:7005166

11s2022-05-19T22:22:02.519Z   FATAL   image scan error: scan error: unable to initialize a scanner: unable to initialize a docker scanner: 3 errors occurred:
    * unable to inspect the image (ansys/twindeployer/runtime-vnc:7005166): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    * unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
    * GET https://index.docker.io/v2/ansys/twindeployer/runtime-vnc/manifests/7005166: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:ansys/twindeployer/runtime-vnc Type:repository]]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

π浅易 2025-02-06 09:35:17

此处有一个类似的问题:

您必须更改命令:

docker run  -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:0.28.0 image ansys/twindeployer/runtime-vnc:7005166

There's a similar question for this problem here: Scanning local docker image for vulnerability using Trivy gives unauthorized

You have to change your command:

docker run  -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:0.28.0 image ansys/twindeployer/runtime-vnc:7005166
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文