-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Relevant for setups where the Jenkins slave (or master) running jobs is itself running in a Docker container.
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