我使用Jenkins來構建項目,但現在我的客戶想要在Docker鏡像中構建內部版本。我已經在服務器上安裝了docker,並在172.0.0.1:PORT
上運行。我已經安裝了Docker插件並將此TCP URL分配給Docker URL。我還創建了一個名爲jenkins-1的圖像 在configure項目中,我使用Build環境Build with Docker Container
並提供圖像名稱。然後在構建放Execute Shell
,然後建立它Jenkins碼頭設置
但它給人的錯誤:
Pull Docker image jenkins-1 from repository ...`
$ docker pull jenkins-1`
Failed to pull Docker image jenkins-1`
FATAL: Failed to pull Docker image jenkins-1`
java.io.IOException: Failed to pull Docker image jenkins-1``
at com.cloudbees.jenkins.plugins.docker_build_env.PullDockerImageSelector.prepare DockerImage(PullDockerImageSelector.java:34)`
at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerB`uildWrapper.java:169)`
at hudson.model.Build$BuildExecution.doRun(Build.java:156)`
at `hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)`
at hudson.model.Run.execute(Run.java:1720)`
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)`
at hudson.model.ResourceController.execute(ResourceController.java:98)`
at hudson.model.Executor.run(Executor.java:404)`
Finished: FAILURE`
image jenkins-1 does not exist! – yashpandey
沒有冒犯,但你真的明白你想要達到的目標嗎?您是否設法實現了同樣的事情(即在Docker容器中構建),而不是由Jenkins驅動? – agg3l
在queston中添加了屏幕截圖。 jenkins-1 exixt @yashpandey – Sidharth