Re: How to mount volume in a docker job inside a dockerized jenkins

2016-05-18 Thread Nicolas Geraud
Ok, with some tests I know understand how "sibling containers" work. thanks for your help Le mercredi 18 mai 2016 11:01:33 UTC+2, nicolas de loof a écrit : > > The reason it works like this is the bind mount is done from host, so need > a valid fully qualified host path, but the `pwd` command is

Re: How to mount volume in a docker job inside a dockerized jenkins

2016-05-18 Thread nicolas de loof
The reason it works like this is the bind mount is done from host, so need a valid fully qualified host path, but the `pwd` command is ran inside jenkins container, so resolves to container filesystem. A possible alternate approach is for you to rely on " --volumes-from $(hostname) ", as a containe

Re: How to mount volume in a docker job inside a dockerized jenkins

2016-05-18 Thread Nicolas Geraud
Thanks for the quick answer, I'll test this tonight. Do you have any blog post (or perhaps i've missed a "Quoi de neuf Docker" episode) which explain why it works like this ? Le mercredi 18 mai 2016 10:28:05 UTC+2, nicolas de loof a écrit : > > For this to work, you'll need the host path to be t

Re: How to mount volume in a docker job inside a dockerized jenkins

2016-05-18 Thread nicolas de loof
For this to work, you'll need the host path to be the exact same as the jenkins container path, i.e. not use /opt/jenkins but /var/jenkins_home on host so `pwd` will resolve to some /var/jenkins_home/... subfolder that make sense to be mounted from host into your side container 2016-05-18 10:14 GM

How to mount volume in a docker job inside a dockerized jenkins

2016-05-18 Thread Nicolas Geraud
Hi all, i'm using a dockerized jenkins (from jenkinsci/jenkins:2.2) and mounting the following volumes from my host : volumes: - "/opt/jenkins:/var/jenkins_home" - "/var/run/docker.sock:/var/run/docker.sock" I've created a job that launch a docker container to build some python