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

docker in docker fail with @tmp permission denied

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • docker
    • None
    • Jenkins2 docker

      I work on jenkins 2.13 with docker slave.

      when i want to run pipeline
      node ('docker-slave')
      docker.image('dockerregistrydev.socrate.vsct.fr/labs/npm:5.11.1').inside

      { sh ("pwd") }

      }

      i get this error:
      sh: /home/jenkins/workspace/test-SGL@tmp/durable-0f3eb18d/pid: No such file or directory
      sh: /home/jenkins/workspace/test-SGL@tmp/durable-0f3eb18d/jenkins-log.txt: No such file or directory
      sh: /home/jenkins/workspace/test-SGL@tmp/durable-0f3eb18d/jenkins-result.txt: No such file or directory

      if i connect on my docker host hand run same command:
      docker run -t -d -u 1000:1000 -w /home/jenkins/workspace/test-SGL -v /home/jenkins/workspace/test-SGL:/home/jenkins/workspace/test-SGL:rw -v /home/jenkins/workspace/test-SGL@tmp:/home/jenkins/workspace/test-SGL@tmp:rw dockerregistrydev.socrate.vsct.fr/labs/npm:5.11.1 cat

      and docker exec <container_id> touch /home/jenkins/workspace/test-SGL@tmp/test,
      i get the same error.

      By default docker create folder /home/jenkins/workspace/test-SGL@tmp with drwxr-xr-x. 2 root root

      If i change privilege with chmod 777 and restart docker exec <container_id> touch /home/jenkins/workspace/test-SGL@tmp/test,

      this is GOOD.

      I think docker can't mount folder with @tmp with the write permission.
      Is it possible to change @tmp by another folder name?

            Unassigned Unassigned
            sebglon sébastien glon
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: