Skip to content

[Jib][Gradle] Custom docker client is not usable due to checks #4387

Open
@bademux

Description

@bademux

Hi,

Jib has really nice feature to plugin custom DockerClient implementation.
However jib-gradle-plugin is overchecking DockerClient installation conditions:

    boolean isDockerInstalled =
        dockerExecutable == null
            ? CliDockerClient.isDefaultDockerInstalled()
            : CliDockerClient.isDockerInstalled(dockerExecutable);
    if (!isDockerInstalled) {
      throw new GradleException(
          HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX));
    }

ref: BuildDockerTask

It basically means that if no executable in system, then BuildDockerTask nuke itself. The behavior is wrong as there may be custom DockerClient waiting.

My ugly hackfix is to fake binary as '/bin/true'.

Could you please fix the issue and thanks for the great feature, I hope java DockerClient will be part of jib ones.

ref: #3571

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions