IIUC your issue has just to do with the fact the file you're passing is
located on the host, hence not accessible to the container.
So, you're left with two options:
* the right one: inherit the official image and customize it with a
dedicated Dockerfile
* the quick and dirty one: bind mount the file you need (using -v) so that
it can be found when the Jenkins container starts. Note that you want to
avoid docker bind-mounts in general, so IMO this solution would possibly
only be used for quickly PoCing what you want.

Cheers
Le 16 mai 2016 10:44 PM, "ZT" <[email protected]> a écrit :

> I am trying to enhance the Jenkins classpath with custom additional jars.
>
> While i am aware that we can include it through the additional classpath
> of groovy plugins . I am currently looking for a more generic option so i
> can run the jar code through jenkins scripting console (besides regular
> jobs) as well.
>
> In a non docker environment, augmenting
> JENKINS_ARGS="--commonLibFolder={filePath}"  while starting jenkins works.
>
> However, when i give the following line in my dockerfile (extending
>  jenkins docker image)
>
> *ENV JENKINS_ARGS --commonLibFolder={filePath}.*
>
> This doesn't work. When i try to load a class from the jar i get a failure
> saying the class cannot be resolved.
>
> Has anyone got this to work within docker? Or any other pointers to
> accomplish this?
>
> Thanks for your help
>
> ZT
>
> --
> 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/e2c7a120-b305-419f-8768-5cb6803b3899%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/e2c7a120-b305-419f-8768-5cb6803b3899%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/CANWgJS7fkQyWA33KWe8b_Vo7acXETuE9eUF51%2BZ8eS9CiAb9rQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to