Hello,

thanks for the help. At the end it was an issue with Firewalld on the Node 
supposed to host jenkins slave docker containers, which prevented to launch 
iptables commands. It was not clear to me where Docker plugin executes 
command but once it connect to Docker REST API, it can launch command on 
the machine that host the docker engine exposing rest API.

To share my experience on that, what I did is:

- Disable firewalld and install iptables-service on the CentOS/RHEL machine 
I was working on
- Configure Docker plugin to reach the physical/virtual node with Docker 
installed that exposes rest API (-H tcp://0.0.0.0:4243 )
- In the Docker template, use a docker image suitable for maven build, such 
as bibinwilson/jenkins-slave:maven
- Label the slave in order to use it in the Build

in this way everything is fine with several docker jenkins slave :)

Thanks

Natale

Il giorno martedì 8 novembre 2016 10:57:45 UTC+1, [email protected] ha 
scritto:
>
>
>    - From my understanding you would build on slaves with Docker 
>    installed there (I guess you have OPS guys for that?).
>    - Then you can create Docker images and/or Docker container as needed.
>    - As an example you could create a container that install Java 8 and 
>    Maven 3 building then a Maven project.
>    - Usually you would do a cleanup afterwards ... at least you remove 
>    the container (usually with --rm=true done automatically)
>    Keep in mind that every build job whould have an own Docker container 
>    since those jobs usually run in parallel.
>    - You should be able to test that build locally ... sth. like 
>    following: docker run --rm=true -v $PWD:/docker -it centos:7.2.15 /docker/
>    build-it.sj
>
> ...when this is ... what you have been looking for ...
>
> On Monday, November 7, 2016 at 5:48:34 PM UTC+1, Natale Vinto wrote:
>>
>> Hello,
>>
>> I was looking at documentation about running builds on jenkins slave 
>> through Docker and everything looks fine with Docker cloud provider and a 
>> jenkins slave image running docker on the same Jenkins host, but I didn't 
>> understood if it would be possible to run builds on Docker containers as 
>> slaves living on another physical/virtual Jenkins node, and how to get it. 
>>
>> Is it possible?
>>
>> Thanks
>>
>> Natale
>>
>

-- 
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/bbd2739b-25af-498d-bcc9-27b7c4550303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to