yet-another-docker-plugin icon indicating copy to clipboard operation
yet-another-docker-plugin copied to clipboard

More configuration parameters

Open delhora opened this issue 7 years ago • 3 comments

Hello!

Thanks for that awesome plugin. I'm configuring a Docker Cloud with jenkinsci/jnlp slave all is working properly, but the only thing I'm missing is being able to pass the command --group-add=

If I put this in the Label "Docker Command" I believe that Plugin is passing it after the image name and Docker Container is treating this like a command to Container instead of a command for configuration.

Is there any way to configure this command?

Thanks in advance

delhora avatar Nov 30 '17 14:11 delhora

able to pass the command --group-add=

To pass where?

KostyaSha avatar Nov 30 '17 16:11 KostyaSha

Hello @KostyaSha !

At the end I want that my jenkins slave in docker starts with the --group-add=

So I want it to run that way:

root@xxx-xxx:~# docker run -ti  --group-add=997  -v /usr/bin/docker:/usr/bin/docker:ro -v /var/run/docker.sock:/var/run/docker.sock:rw -v /usr/lib/x86_64-linux-gnu/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7 jenkinsci/jnlp-slave /bin/bash
jenkins@5dd2f39984ec:~$ id
uid=10000(jenkins) gid=10000(jenkins) groups=10000(jenkins),997

Instead of:

root@xxx-xxx:~# docker run -ti -v /usr/bin/docker:/usr/bin/docker:ro -v /var/run/docker.sock:/var/run/docker.sock:rw -v /usr/lib/x86_64-linux-gnu/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7 jenkinsci/jnlp-slave --group-add=997 /bin/bash
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
"--group-add=997" is not a valid option
java -jar slave.jar [options...] <secret key> <slave name>

At last I think this is the issue that is happening !

Thanks again!

delhora avatar Dec 01 '17 09:12 delhora

We have a similar issue regarding passing --cap-add SYS_PTRACE has there been any progress?

timosachsenberg avatar Mar 01 '21 11:03 timosachsenberg