AnchoreWorker anchore-engine добавить изображение не удалось - PullRequest
0 голосов
/ 20 мая 2019

Я установил anchore engine локально (127.0.0.1), когда я использую anchore-cli для сканирования изображений, он работает, но когда я пытаюсь использовать его с конвейером ci / cd с Jenkins, Dockerfile и Jenkinsfile, я получаю сообщение об ошибке. Я выполнил следующие действия: -Установил якорный плагин и настроил его. 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
...