GoogleContainerTools/jib · error · MojoExecutionException
HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS
Error message
HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX)
What it means
BuildDockerMojo's execute() checks whether Docker is installed before delegating to the Docker daemon: it uses the configured dockerClient (executable path) if set, otherwise checks the default docker binary via CliDockerClient.isDefaultDockerInstalled(). If not installed, it throws MojoExecutionException with HelpfulSuggestions.forDockerNotInstalled advice, pointing the user to install Docker.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:74
public class BuildDockerMojo extends JibPluginConfiguration {
@VisibleForTesting static final String GOAL_NAME = "dockerBuild";
private static final String HELPFUL_SUGGESTIONS_PREFIX = "Build to Docker daemon failed";
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
checkJibVersion();
if (MojoCommon.shouldSkipJibExecution(this)) {
return;
}
Path dockerExecutable = getDockerClientExecutable();
boolean isDockerInstalled =
dockerExecutable == null
? CliDockerClient.isDefaultDockerInstalled()
: CliDockerClient.isDockerInstalled(dockerExecutable);
if (!isDockerInstalled) {
throw new MojoExecutionException(
HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX));
}
MavenSettingsProxyProvider.activateHttpAndHttpsProxies(
getSession().getSettings(), getSettingsDecrypter());
TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();
MavenProjectProperties projectProperties =
MavenProjectProperties.getForProject(
Preconditions.checkNotNull(descriptor),
getProject(),
getSession(),
getLog(),
tempDirectoryProvider,
getInjectedPluginExtensions());
Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());
try {View on GitHub (pinned to fb949e2676)
Solutions
- Install Docker and ensure `docker` is on the PATH (`docker version` must succeed).
- If using <dockerClient><executable>, fix the path to point to a valid docker binary.
- Start Docker Desktop / the docker daemon if it is installed but not running.
- Use `mvn jib:build` (registry-based) instead, which does not require a local Docker daemon.
Example fix
<!-- before --> <dockerClient><executable>/opt/old/docker</executable></dockerClient> <!-- after --> <!-- remove custom executable, or point to real docker --> <dockerClient><executable>/usr/bin/docker</executable></dockerClient>
Defensive patterns
Strategy: validation
Validate before calling
# shell pre-check before mvn build
docker version > /dev/null 2>&1 || { echo 'Docker not installed/running'; exit 1; } Prevention
- Install Docker and add it to PATH in dev and CI images.
- Verify `docker version` works before invoking jib:dockerBuild.
- Prefer jib:build (registry push) in Docker-less CI environments.
- Keep <dockerClient><executable> pointing at a real binary.
When it happens
Trigger: Running `mvn jib:dockerBuild` (or dockerBuild lifecycle invocation) on a machine where the `docker` CLI is absent, or where the custom <dockerClient><executable> path does not exist/is not a runnable Docker binary.
Common situations: CI containers without Docker, macOS/Windows without Docker Desktop running, custom dockerExecutable pointing to a non-existent path after a toolchain change.
Related errors
- <message from BuildStepsExecutionException>
- SHA-256 algorithm implementation not found - might be a brok
- the configured platform (%s/%s) doesn't match the platform (
- Timeout reached while waiting for 'docker info' output
- Failed to read output of 'docker info': <message>
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/d6a9f6d04c097e6b.
Report an issue: GitHub.