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

docker.inside fails to run `docker` on a docker4mac ssh slave

XMLWordPrintable

      How to reproduce :

      1. setup a docker4mac machine as a ssh slave
      2. run this pipeline :
        node ('slave'){
                docker.image("ubuntu").inside{ 
                    sh 'ps -ef'
                }
        }
        

        shell step fail to run docker command.

      This is expected as docker4mac client binary is installed under /usr/local/bin which isn't part of non-interactive ssh session PATH. So, never mind, let's declare a docker tool installation

      node ('slave'){
          docker.withTool("docker4mac"){ 
              docker.image("ubuntu").inside{ 
                  sh 'ps -ef'
              }
          }
      }
      

      Still falling.

      Not sure about possible workaround.

            jglick Jesse Glick
            ndeloof Nicolas De Loof
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: