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

sh not working inside docker container

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • docker
    • None

      sh command not working wile specifying user to run inside contrainer.
      Example:

      docker.image('node:latest').inside('--user node') {
      stage('Pull repository') {    
          sh 'whoami'
      }    
      

      In this case checkout and other jenkins functions is working, but not any of sh

      Process is pending for 5 minutes and then return:

      process apparently never started in /var/lib/jenkins/workspace/contrail-ui/contrail-ui-builder@2@tmp/durable-ae2b4ade (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
      

      Error appears to be with any container.

       

            csanchez Carlos Sanchez
            szhyhalo Oleksandr Zhyhalo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: