theonedev/onedev · error · ExplicitException
Loopback address not allowed for source docker image of push
Error message
Loopback address not allowed for source docker image of push image step, please use ip address or host name instead
What it means
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.
Source
Thrown at server-core/src/main/java/io/onedev/server/buildspec/step/PullImageStep.java:91
public void setMoreOptions(String moreOptions) {
this.moreOptions = moreOptions;
}
static List<InputSuggestion> suggestVariables(String matchWith) {
return BuildSpec.suggestVariables(matchWith, true, true, false);
}
@Override
public String getCommand() {
var builder = new StringBuilder("crane pull --format oci ");
if (getPlatform() != null)
builder.append("--platform ").append(getPlatform()).append(" ");
if (getMoreOptions() != null)
builder.append(getMoreOptions()).append(" ");
if (getSrcImage().contains("localhost") || getSrcImage().contains("127.0.0.1"))
throw new ExplicitException("Loopback address not allowed for source docker image of push image step, please use ip address or host name instead");
builder.append(getSrcImage()).append(" /onedev-build/work/").append(getDestPath());
return builder.toString();
}
}
View on GitHub (pinned to d44925c47c)
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.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server-core/src/main/java/io/onedev/server/buildspec/step/PullImageStep.java:91 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/8eee617eff174ceb.
Report an issue: GitHub.