在循环中使用多个伪造图像进行一次扫描
我有一个文本文件包含来自文物的图像。 我有一个Shell脚本可以在循环中在这些图像上运行Blackduck扫描,但是我会遇到诸如无效的参考格式之类的错误。
#!/usr/bin/sh
input="dockerimagesURL.txt"
while read dockerimagesURL
do
docker pull "$dockerimagesURL"
DockerImageID=$(docker images "$dockerimagesURL" --format '{{.ID}}')
sudo -S java -jar /home/dxc/Desktop/synopsis-detect-7.11.0/synopsys-detect-7.11.0.jar -- scan command continued.
done < $1
dockerimagesurl.txt文件包含:
buildimages-docker-local.artifactory.com/docker-registry1:tag
buildimages-docker-local.artifactory.com/docker-registry2:tag
buildimages-docker-local.artifactory.com/docker-registry3:tag
buildimages-docker-local.artifactory.com/docker-registry4:tag
上面的脚本由于多种原因而失败: 无效的参考格式
docker pult-不发生
I have a text file contains of images from Artifactory.
I have a shell script to run blackduck scan on those images in a loop but I am getting errors like invalid reference format.
#!/usr/bin/sh
input="dockerimagesURL.txt"
while read dockerimagesURL
do
docker pull "$dockerimagesURL"
DockerImageID=$(docker images "$dockerimagesURL" --format '{{.ID}}')
sudo -S java -jar /home/dxc/Desktop/synopsis-detect-7.11.0/synopsys-detect-7.11.0.jar -- scan command continued.
done < $1
dockerimagesURL.txt file contains:
buildimages-docker-local.artifactory.com/docker-registry1:tag
buildimages-docker-local.artifactory.com/docker-registry2:tag
buildimages-docker-local.artifactory.com/docker-registry3:tag
buildimages-docker-local.artifactory.com/docker-registry4:tag
The above script is failing for multiple reasons:
Invalid reference format
docker pull -- not happening
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的完整错误消息是
“ TAG”是占位符。用真正存在的标签替换它,例如“最新”(默认值)。
如果存储库无效/无法找到该更改之后,此错误仍然可能存在!
Assuming your full error message is
'tag' is a placeholder. Replace it by a tag that really exists, e.g. 'latest' (the default).
The error could still exist after that change if the repository is not valid/cannot be found!