Answers: <p>You need to install the Docker Commons plugin? <a href="https://plugins.jenkins.io/docker-commons/" rel="nofollow noreferrer">https://plugins.jenkins.io/docker-commons/</a></p>
  
  <p>Edit: According to this link for <a href="https://support.cloudbees.com/hc/en-us/articles/230922468-Pipeline-I-would-like-to-use-Docker-CLI-inside-of-a-Pipeline-job" rel="nofollow noreferrer">I would like to use Docker CLI inside of a Pipeline job </a></p>
  
  <blockquote>
    <p>You need to make sure that “default” points to a docker tool inside of
    Manage Jenkins> Configure System which will also run on the os of the
    slave.</p>
  </blockquote>
  
Answers: CC BY-SA 4.0
Answers: 2020-02-14T17:39:00.047Z
Answers: I have that plugin installed at version 1.16 (it even got installed during the setup process)
Answers: Cowboy_Patrick
Answers: CC BY-SA 4.0
Answers: 2020-02-14T20:08:48.093Z
Answers: @Cowboy_Patrick I amended my original answer. Hope that helps!
Answers: Argyle
Answers: CC BY-SA 4.0
Answers: 2020-02-14T20:59:19.147Z
Answers: how would I apply this if I want to use docker compose?
Answers: Cowboy_Patrick
Answers: CC BY-SA 4.0
Answers: 2020-02-14T17:22:29.757Z
Answers: 2020-02-14T20:08:17.423Z
Answers: 2020-02-14T20:08:17.423Z
Answers: Argyle
Body: <p>I'm new to Jenkins and I want to automatize my current workflow a little bit. Right now I push it to the raspberry. Then via SSH I pull the changes, run <code>docker-compose build</code> and <code>docker-compose up</code> afterwards. </p>
  
  <p>My jenkins file is: </p>
  
  <pre><code>pipeline{
      agent any
  
      stages{
          stage('build'){
              steps{
                  script{
                      docker.withTool("default") {
                          sh 'docker-compose build'
                      }
                  }
  
              }
  
          }
  
          stage('deploy'){
              steps{
                  script{
                      docker.withTool("default") {
                          sh 'docker-compose up'
                      }
                  }
  
              }
          }
      }
  }
  </code></pre>
  
  <p>And when clicking 'build now' I get the following console-output:</p>
  
  <pre><code>[Pipeline] }
  [Pipeline] // stage
  [Pipeline] withEnv
  [Pipeline] {
  [Pipeline] stage
  [Pipeline] { (build)
  [Pipeline] script
  [Pipeline] {
  [Pipeline] tool
  [Pipeline] }
  [Pipeline] // script
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (deploy)
  Stage "deploy" skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: No org.jenkinsci.plugins.docker.commons.tools.DockerTool named default found
  Finished: FAILURE
  </code></pre>
  
  <p>I also tried running it with docker.withTool("docker") but that gave me the same results.</p>
  
Tags: <docker><jenkins><jenkins-pipeline><docker-compose>
Title: Jenkins file that uses docker-compose gives ambigous error
UserDisplayName: Cowboy_Patrick
ThreadText: # Jenkins file that uses docker-compose gives ambigous error
  
  (Asked by: username_0 on 2020-02-14)
  
  I'm new to Jenkins and I want to automatize my current workflow a little bit. Right now I push it to the raspberry. Then via SSH I pull the changes, run `docker-compose build` and `docker-compose up` afterwards.
  
  My jenkins file is:
  
  ```
  pipeline{
      agent any
  
      stages{
          stage('build'){
              steps{
                  script{
                      docker.withTool("default") {
                          sh 'docker-compose build'
                      }
                  }
  
              }
  
          }
  
          stage('deploy'){
              steps{
                  script{
                      docker.withTool("default") {
                          sh 'docker-compose up'
                      }
                  }
  
              }
          }
      }
  }
  
  ```
  
  And when clicking 'build now' I get the following console-output:
  
  ```
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] withEnv
  [Pipeline] {
  [Pipeline] stage
  [Pipeline] { (build)
  [Pipeline] script
  [Pipeline] {
  [Pipeline] tool
  [Pipeline] }
  [Pipeline] // script
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (deploy)
  Stage "deploy" skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: No org.jenkinsci.plugins.docker.commons.tools.DockerTool named default found
  Finished: FAILURE
  
  ```
  
  I also tried running it with docker.withTool("docker") but that gave me the same results.
  
  **Tags:** docker, jenkins, jenkins-pipeline, docker-compose
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-02-14. Score: 1
  
  You need to install the Docker Commons plugin? <https://plugins.jenkins.io/docker-commons/>
  
  Edit: According to this link for [I would like to use Docker CLI inside of a Pipeline job](https://support.cloudbees.com/hc/en-us/articles/230922468-Pipeline-I-would-like-to-use-Docker-CLI-inside-of-a-Pipeline-job)
  
  > You need to make sure that “default” points to a docker tool inside of
  > Manage Jenkins> Configure System which will also run on the os of the
  > slave.
  
  > **Comments:**
  > **username_0**: I have that plugin installed at version 1.16 (it even got installed during the setup process)  
  > **username_1**: @username_0 I amended my original answer. Hope that helps!  
  > **username_0**: how would I apply this if I want to use docker compose?  
  
  ---
  
  