【发布时间】:2023-01-29 01:50:15
【问题描述】:
所以我有一个问题:
- 我有一个正在运行的 jenkins 容器,它执行一些 CI 步骤
- 我下载了里面的那个 jenkins 容器 trivy。
- 在 CI 管道中,如果我想用 trivy 扫描 docker 镜像,它会说:
FATAL scan error: image scan failed: failed analysis: analyze error: timeout: context deadline exceeded或者
trivy image trivy:test 2023-01-27T13:45:57.711Z INFO Need to update DB 2023-01-27T13:45:57.711Z INFO Downloading DB... 31.14 MiB / 31.14 MiB [----------] 100.00% 1.70 MiB p/s 18s然后在那之后卡住了
我这样诊断问题 - docker 图像存储在我的电脑上,我在 CI 管道中运行的步骤是从我的 jenkins 容器中执行的命令,trivy 无法识别来自 jenkins 容器外部的图像。
再说一次 - 从 jenkins 容器内部运行的命令
trivy image test:test如何访问我的本地 docker 图像?帮助将不胜感激:)
【问题讨论】:
标签: docker jenkins dockerfile containers trivy