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 
files :
--Dockerfile

FROM python:3-onbuild
CMD [ "python" ]


docker command of my jenkins job :
$docker run --rm -v `pwd`:"/usr/src/myapp" graviteeio/python3 python 
src/main/python/package_bundles.py

But the result is :


Starting docker_package_bundle_and_publish_1
Attaching to docker_package_bundle_and_publish_1
 [36mpackage_bundle_and_publish_1 | [0m python: can't open file './src/main/
python/package_bundles.py': [Errno 2] No such file or directory
 [36mdocker_package_bundle_and_publish_1 exited with code 2
 [0mFinished: SUCCESS


This is working fine on a classic jenkins, but not on a dockerized jenkins. 
I've googled this error and it seems that mounting a volume inside a container 
with an already mounting volume doesn't work.

I think that some of you have already test the same use case so, how to do that 
?

Thanks for any clue.
I need to test a data volume instead of mounting a host volume.


-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f847d41e-3b28-4b2b-b61e-ca0bf2927e5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to