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

docker image has permission problems

XMLWordPrintable

      If I pull down a docker image (mcr.microsoft.com/dotnet/sdk:6.0) and run it, I'm able to execute `apt-get -y update` without issues. The same command inside Jenkins returns the following error:
      E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
       

      If I try to elevate my permissions by executing `su`, it works in my local docker image, but not in Jenkins. I get the error: 
      Password: su: Authentication failure
       

      The pipeline can be defined as follows:

      node {
          docker.image('mcr.microsoft.com/dotnet/sdk:6.0').inside {
              stage('reproduction') {
                  sh 'apt-get -y update'
              }
          }
      }

       

      Expections:

      I would expect that this stage executes successfully. Subsequently, I'd expect to be able to run `apt-get install -y zip`.

            Unassigned Unassigned
            trent_jones Trent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: