Could not build image: pull access denied,We need to build image and base image from private registry

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Could not build image: pull access denied,We need to build image and base image from private registry

幻灭
we need to build docker image from our private registry, so dockerfile need pull base image from registry, but docker-plugin don't support login? 
we config docker cloud use tcp://xxx.xxx.xxx.xxx:2376 to connect our docker。
======================= Dockerfile==================================== 
FROM harbor.xxx.com:8443/cd-dev/base/xxx:openjdk-11.0-gs-1.3.5-V1.0.2-RELEASE

ADD target/app.jar app.jar
RUN sh -c 'touch /app.jar'

EXPOSE 8080
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/app.jar"]  
======================= config=======================================  
QQ截图20210203111146.jpg
======================= logs =======================================
ERROR: Build step failed with exception com.github.dockerjava.api.exception.DockerClientException: Could not build image: pull access denied for harbor.xxxx.com:8443/cd-dev/base/xxxx, repository does not exist or may require 'docker login': denied: requested access to the resource is denied at com.github.dockerjava.core.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:79) at com.github.dockerjava.core.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:51) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher$Run.buildImage(DockerBuilderPublisher.java:370) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher$Run.run(DockerBuilderPublisher.java:310) at com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher.perform(DockerBuilderPublisher.java:451) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:944) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:894) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513) at hudson.model.Run.execute(Run.java:1907) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Build step 'Build / Publish Docker Image' marked build as failure Finished: FAILURE  

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9c822578-1151-4e65-ad0d-d64840ed8b0cn%40googlegroups.com.