You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem on this specific Jenkins instance was, that the build executor of the Jenkins instance was a docker container that mounted the docker socket so Jenkins Pipelines can start Docker containers on the same docker host as the build executor (i.e. sibling containers).
However, the path /var/lib/jenkins_home on the host was mounted into /var/jenkins_home on the build executor (see jenkinsci/docker/Dockerfile).
So, when the Pipeline (on the build executor) mounted files from the workspace to its sibling container, the docker host could not mount /var/jenkins_home because it did not exist on the host (as the files were positioned under /var/lib/jenkins_home there).
So we learned: When build executors are Docker containers that allow pipelines to access their docker host,
the JENKINS_HOME in the build executor's container should have the same absolute path as the JENKINS_HOME on the docker host.
Otherwise in Pipelines mounting files from the workspace into docker containers created within the Pipeline will fail.
There are two solutions:
Change the JENKINS_HOME on the docker host
Change the JENKINS_HOME in the build executor container.
Problem when using
MavenInDocker
and running maven likemvn 'install'
the following error occurred:The text was updated successfully, but these errors were encountered: