Ah bind-mounts... FWIW, as a general rule, bind-mounts should be avoided as much as possible, though using them especially for local dev & CI usage is indeed a pretty common hack (or for special things like TZ configuration where you mount the host file [in ro]).
Depending on how you're using your thing, you can choose different paths. Either run an agent on that docker host, probably the simplest. Or, you redesign your image to not require bind mounts. Like, for example, you create an image from maven:3.3.9-jdk-8 that's able to Git clone & execute the command you need directly (or you pass it as an argument, anyway). 2016-11-21 11:25 GMT+01:00 'Peter Teichner' via Jenkins Users < [email protected]>: > Hi All, > > I'm slightly unsure whether the topic is more suitable here or on Docker > forums - anyway I decided to post it here. > > I have a pipeline whereby I have a job to build my Docker images using the > Docker cloud plugin ( building 2-3 images at a time, application, db, proxy) > In a separate job I used to run docker-compose which would start my > containers and a separate container to run the test. In this setup I had my > Jenkins master and Docker engine co-located on 1 server. > > version: '2' > services: > abc: > image: abc > hostname: abc > links: > - abc-mongo > abc-mongo: > image: abc-mongo > hostname: abc-mongo > tester: > image: maven:3.3.9-jdk-8 > hostname: tester > links: > - abc > command: mvn -q -f /cucumber/pom.xml clean integration-test > volumes: > - /${PWD}/cucumber:/cucumber > > > Following some consideration I've decided to move Docker to a different > machine and now I've got this problem where mount the cucumber folder is > impossible as the machine is not the same. > > Any suggestion on this in terms of best practices and solution? Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/c6fbd512-3599-4f4c-9e05-3284b07b04df%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/c6fbd512-3599-4f4c-9e05-3284b07b04df%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5K1i4799QXd8m-4pQQgrxB%2BB%3DdcvJZhR-C2jDLQZG83w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
