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