{"record":{"id":"8eee617eff174ceb","repo":"theonedev/onedev","slug":"loopback-address-not-allowed-for-source-docker-ima","errorCode":null,"errorMessage":"Loopback address not allowed for source docker image of push image step, please use ip address or host name instead","messagePattern":"Loopback address not allowed for source docker image of push image step, please use ip address or host name instead","errorType":"validation","errorClass":"ExplicitException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/buildspec/step/PullImageStep.java","lineNumber":91,"sourceCode":"\n\tpublic void setMoreOptions(String moreOptions) {\n\t\tthis.moreOptions = moreOptions;\n\t}\n\n\tstatic List<InputSuggestion> suggestVariables(String matchWith) {\n\t\treturn BuildSpec.suggestVariables(matchWith, true, true, false);\n\t}\n\n\t@Override\n\tpublic String getCommand() {\n\t\tvar builder = new StringBuilder(\"crane pull --format oci \");\n\t\tif (getPlatform() != null)\n\t\t\tbuilder.append(\"--platform \").append(getPlatform()).append(\" \");\n\t\tif (getMoreOptions() != null)\n\t\t\tbuilder.append(getMoreOptions()).append(\" \");\n\t\t\n\t\tif (getSrcImage().contains(\"localhost\") || getSrcImage().contains(\"127.0.0.1\"))\n\t\t\tthrow new ExplicitException(\"Loopback address not allowed for source docker image of push image step, please use ip address or host name instead\");\n\t\tbuilder.append(getSrcImage()).append(\" /onedev-build/work/\").append(getDestPath());\n\t\treturn builder.toString();\n\t}\n\t\n}\n","sourceCodeStart":73,"sourceCodeEnd":97,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/buildspec/step/PullImageStep.java#L73-L97","documentation":"PullImageStep builds its crane pull command and refuses source images referencing localhost or 127.0.0.1, because the registry must be addressable from the build environment, not the loopback interface.","triggerScenarios":"Thrown at server-core/src/main/java/io/onedev/server/buildspec/step/PullImageStep.java:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace localhost/127.0.0.1 in the source image reference with the registry's IP address or host name.","Use a resolvable registry URL."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}