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

Docker in Docker fix with JENKINS_HOME persistent volume

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Relevant for setups where the Jenkins slave (or master) running jobs is itself running in a Docker container.
    • Similar Issues:

      Description

      Added two advanced options for DockerBuildWrapper:

      • dockerSlaveJenkinsRoot (the Docker host directory for $JENKINS_HOME)
      • dockerSlaveTmpDir (the Docker host directory for java.os.tmpdir)

      This is necessary to make this plugin work for setups where the Jenkins slave running the build runs in a Docker container, and has $JENKINS_HOME volume-bound from a host path that is different from the container mount point (which is typically the case).

      In addition, a Jenkins slave running inside a container will not be able to share its /tmp directory with the build container out of the box. The dockerSlaveTmpDir setting can be used to share a persistent volume between the slave and build container.

      Both options support token-macro expansion, so they can be configured per slave.

      Pull request: https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/53

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              jonhermansen Jon Hermansen
              Reporter:
              stigsb Stig Bakken
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: