Using docker-toolbox I want to mount the maven repository of my host in my jenkins container to alleviate loading.
What I expect: Having the host maven repository at //d/apps/maven/repository (Which is mounted in the docker-machine by docker toolbox): result of df -h in the docker-machine:
Filesystem Size Used Avail Use% Mou
C: 239G 186G 54G 78% /c
D: 466G 75G 391G 17% /d
(D is a local drive)
What i see, the /var/jenkins_home/.m2/repository folder is empty though the jenkins user has read and execute access.
Reproduction
Creating a datacontainer for a jenkins container:
docker run -v //d/apps/maven/repository://var/jenkins_home/.m2/repository -v //var/jenkins_home/jobs -v //var/jenkins_home/plugins --name data_jenkins busybox
And then mounting the data container to the jenkins container:
docker run -d --volumes-from data_jenkins --name my_jenkins -p 28080:8080 jenkins
Result:
Jenkins is reachable on http://192.168.99.100:28080 as expected, but the maven repo folder (/var/jenkins_home/.m2/repository) is empty.
Can somebody point out the error in my ways here?
OS : Windows 7 enterprise
Docker-toolbox: 1.9.1
Virtualbox 5.0.10 (Not the one included in docker-toolbox)
Cheers! Philip