{"record":{"id":"d6a9f6d04c097e6b","repo":"GoogleContainerTools/jib","slug":"helpfulsuggestions-fordockernotinstalled-helpful-s","errorCode":null,"errorMessage":"HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX)","messagePattern":"HelpfulSuggestions\\.forDockerNotInstalled\\(HELPFUL_SUGGESTIONS_PREFIX\\)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java","lineNumber":74,"sourceCode":"public class BuildDockerMojo extends JibPluginConfiguration {\n\n  @VisibleForTesting static final String GOAL_NAME = \"dockerBuild\";\n  private static final String HELPFUL_SUGGESTIONS_PREFIX = \"Build to Docker daemon failed\";\n\n  @Override\n  public void execute() throws MojoExecutionException, MojoFailureException {\n    checkJibVersion();\n    if (MojoCommon.shouldSkipJibExecution(this)) {\n      return;\n    }\n\n    Path dockerExecutable = getDockerClientExecutable();\n    boolean isDockerInstalled =\n        dockerExecutable == null\n            ? CliDockerClient.isDefaultDockerInstalled()\n            : CliDockerClient.isDockerInstalled(dockerExecutable);\n    if (!isDockerInstalled) {\n      throw new MojoExecutionException(\n          HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX));\n    }\n\n    MavenSettingsProxyProvider.activateHttpAndHttpsProxies(\n        getSession().getSettings(), getSettingsDecrypter());\n\n    TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();\n    MavenProjectProperties projectProperties =\n        MavenProjectProperties.getForProject(\n            Preconditions.checkNotNull(descriptor),\n            getProject(),\n            getSession(),\n            getLog(),\n            tempDirectoryProvider,\n            getInjectedPluginExtensions());\n\n    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());\n    try {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java#L56-L92","documentation":"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.","triggerScenarios":"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.","commonSituations":"CI containers without Docker, macOS/Windows without Docker Desktop running, custom dockerExecutable pointing to a non-existent path after a toolchain change.","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."],"exampleFix":"<!-- before -->\n<dockerClient><executable>/opt/old/docker</executable></dockerClient>\n<!-- after -->\n<!-- remove custom executable, or point to real docker -->\n<dockerClient><executable>/usr/bin/docker</executable></dockerClient>","handlingStrategy":"validation","validationCode":"# shell pre-check before mvn build\ndocker version > /dev/null 2>&1 || { echo 'Docker not installed/running'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["maven","docker","environment","prerequisite-check"],"backgroundTag":"command-not-found","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}