There are 3 ways I know of that allows you to avoid having the Jenkins slave dependency in the container:

1. Use Docker Slaves Plugin

    - Has some limitations, but works for the most part. Supports pipeline at least partially, and can run on dockerized slaves. Will not run directly on existing slaves but will provision on the fly from docker. Only supports one docker host and a single global limit on number of containers.

2. Use Cloudbees Docker Custom build environment plugin

    - A bit old codebase, that does not support newer docker features. Does not support running as a sibling container to a jenkins slave container. No pipeline support. Uses existing slaves that must have docker support, so multiple docker hosts are possible. Someone requested to adopt this plugin some time ago, so this can change over time.

3. Use the Docker Pipeline plugin, specifically the .inside syntax

    - This only supports pipeline, nothing else. Very mature and is the new way to do this. Uses existing slaves that must have docker support, so multiple docker hosts are possible. Supports running as a sibling container to a Jenkins slave container (with docker socket bind mounted).

All 3 have the property that you can use any oracle linux image that you have without worrying about installing the correct JRE version for Jenkins. The actual Jenkins node can be any slave with Docker running.

Note that this has the added bonus that a new container is created for every build, so anything your builds can do to your build environment will not affect future builds.

IMO, your best bet is option 3 if you can, i.e. you have everything running in pipeline.

/Jacob

On 2018-01-16 10:36, [email protected] wrote:
Hi ,

We have a problem on Jenkins on which container the job will run.

By default jenkins job is using jnlp container to run the Jobs.

inorder to run the jobs on the oraclelinux image.

1. We Successfully created docker-jnlp-slave image with oraclelinux image.
2. Able to pull docker-jnlp-slave image and create container.
3. Jnlp and docker-jnlp-slave(oraclelinux ) 2 containers created.
Test job console output shows that , By default jenkins job is using jnlp container (jenkins/jnlp-slave:alpine)

is there a way to run jobs on oraclelinux container.

Regards,
Basanta
--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34b309e6-2bd6-4c57-9e5a-5b3696f247d8%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/34b309e6-2bd6-4c57-9e5a-5b3696f247d8%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/f51558b6-912a-e936-db50-15606c5b070e%40larsen.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to