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

Docker Pipeline plugin: docker.withServer still executes on local Jenkins server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • docker-workflow-plugin
    • None
    • Jenkins installed: OSX 10.10 local boot2docker 1.9.1, Docker 1.9.1 on Ubuntu VM

      Expect this to be executed on the remote Docker host with TLS configured, instead it is executed on the Jenkins-local Docker container (remote ip: 10.11.11.109, port: 2376, Docker credential ID: my-docker-creds) :

      docker.withServer('tcp://10.11.11.109:2376', 'my-docker-creds'){ s ->
        docker.image('httpd').inside { c ->
          sh 'uname -a'
        }
      }
      

      This is the console output:

      [Pipeline] node {
      [Pipeline] Sets up Docker server endpoint : Start
      [Pipeline] withDockerServer {
      [Pipeline] sh
      [fds] Running shell script
      + docker inspect -f . httpd
      .
      [Pipeline] Run build steps inside a Docker container : Start
      $ docker run -t -d -u 501:20 -w /Users/kzantow/jenkins_latest_jan_2016/workspace/fds -v /Users/kzantow/jenkins_latest_jan_2016/workspace/fds:/Users/kzantow/jenkins_latest_jan_2016/workspace/fds:rw -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** httpd cat
      [Pipeline] withDockerContainer {
      [Pipeline] sh
      ...
      

            jglick Jesse Glick
            kzantow Keith Zantow
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: