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

docker.image('alpine').inside doesn't work for alpine images

XMLWordPrintable

      Create a pipeline job and run some commands inside any alpine image with the docker pipeline step it will give an error /bin/bash not found

      same steps will work fine in ubuntu image

       

      Steps to Reproduce:

      pipeline {
          agent any    stages {
              stage('Hello') {
                  steps {
                      script {
                           docker.image('alpine').inside {
                              sh 'ls -lrt'
                          }
                      }
                  }
              }
          }
      } 

      Output:
      [Pipeline] sh sh: /bin/bash: not found

            Unassigned Unassigned
            sudarshan Sudarshan T N
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: