Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40140

Remote Docker host not working

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm using the Cloudbees Docker Build and Publish plugin, but when I specify a remote Docker host for image building and pushing, seems that it still tries to use the local docker cmd.

      For example, I have a docker host running at http://myhost.com:4243 without credentials, I specified the Docker Host URI to be http://myhost.com:4243, but the build fails with error,

      ```
      ERROR: Cannot run program "docker" (in directory "/var/jenkins_home/sharedspace"): error=2, No such file or directory
      java.io.IOException: Cannot run program "docker" (in directory "/var/jenkins_home/sharedspace"): error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
      at hudson.Launcher$ProcStarter.start(Launcher.java:381)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:487)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:431)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:373)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:311)
      at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:291)
      at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:262)
      ```

      My plugin version is 1.3.2

        Attachments

          Activity

          Hide
          csanchez Carlos Sanchez added a comment -

          even when using a remote docker seerver you still need the docker client installed locally

          Show
          csanchez Carlos Sanchez added a comment - even when using a remote docker seerver you still need the docker client installed locally
          Hide
          jeckyli Zheng Li added a comment -

          Thanks, didn't know that. Then the tricky thing is I'm running jenkins from the jenkins Docker image, does this mean there is no way I can get this plugin to work without manually get a docker client inside it?

          Show
          jeckyli Zheng Li added a comment - Thanks, didn't know that. Then the tricky thing is I'm running jenkins from the jenkins Docker image, does this mean there is no way I can get this plugin to work without manually get a docker client inside it?

            People

            Assignee:
            csanchez Carlos Sanchez
            Reporter:
            jeckyli Zheng Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: