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

Docker build step tries to build on master and not slave

XMLWordPrintable

      When running a Docker build step create image command on a slave it tries to run it on the master

      21:15:04 Building remotely on pollux (twins) in workspace /var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker
      ...
      21:15:11 FATAL: configured dockerFolder '/var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker/' does no exist.
      21:15:11 java.lang.IllegalArgumentException: configured dockerFolder '/var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker/' does no exist.
      21:15:11 	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:85)
      21:15:11 	at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:65)
      

      Manually creating the workspace on master, and it goes one step further

      22:52:40 FATAL: configured dockerFolder '/var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker' does not contain a Dockerfile.
      22:52:40 java.lang.IllegalArgumentException: configured dockerFolder '/var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker' does not contain a Dockerfile.
      22:52:40 	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:91)
      22:52:40 	at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:65)
      

      And creating an empty Dockerfile goes one more step but it keeps trying to build on master and not slave

      22:55:56 FATAL: com.kpelykh.docker.client.DockerException: Dockerfile /var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker/Dockerfile is empty
      22:55:56 java.lang.RuntimeException: com.kpelykh.docker.client.DockerException: Dockerfile /var/lib/jenkins/workspace/oracle-java7/jenkins-slave-docker/Dockerfile is empty
      22:55:56 	at org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand.execute(CreateImageCommand.java:142)
      22:55:56 	at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder.perform(DockerBuilder.java:65)
      

            vjuranek vjuranek
            hackmann Hack Kampbjørn
            Votes:
            19 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved: