我已经在本地安装了anchore引擎(127.0.0.1),当我使用anchore-cli扫描图像时它可以工作,但是当我尝试将其与詹金斯,Dockerfile和Jenkinsfile的ci / cd管道一起使用时,出现了错误。我已经执行了以下操作: -安装了锚插件并进行了配置。 -Dockerfile和jenkinsfile在github存储库中。 我得到的错误如下:
2019-05-20T10:50:20.930 ERROR AnchoreWorker anchore-engine add image failed. URL: http://127.0.0.1:8228/v1/images, status: HTTP/1.1 400 BAD REQUEST, error: {
"detail": {
"error_codes": [
"REGISTRY_PERMISSION_DENIED"
],
"raw_exception_message": "Error encountered in skopeo operation. cmd=/bin/sh -c skopeo inspect --raw --tls-verify=false docker://docker.io/library/hellonode:latest, rc=1, stdout=None, stderr=b'time="2019-05-20T08:50:20Z" level=fatal msg="Error reading manifest latest in docker.io/library/hellonode: errors:\ndenied: requested access to the resource is denied\nunauthorized: authentication required\n" \n', error_code=REGISTRY_PERMISSION_DENIED"
},
"httpcode": 400,
"message": "cannot fetch image digest/manifest from registry"
}
2019-05-20T10:50:20.931 ERROR AnchorePlugin Failing Anchore Container Image Scanner Plugin step due to errors in plugin execution
hudson.AbortException: Failed to analyze hellonode due to error adding image to anchore-engine. Check above logs for errors from anchore-engine
at com.anchore.jenkins.plugins.anchore.BuildWorker.runAnalyzerEngine(BuildWorker.java:257)
at com.anchore.jenkins.plugins.anchore.BuildWorker.runAnalyzer(BuildWorker.java:177)
at com.anchore.jenkins.plugins.anchore.AnchoreBuilder.perform(AnchoreBuilder.java:335)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-05-20T10:50:20.931 INFO AnchorePlugin Completed Anchore Container Image Scanner step
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Failed to analyze hellonode due to error adding image to anchore-engine. Check above logs for errors from anchore-engine
Finished: FAILURE