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

No ability to customise the capabilities that Docker keeps

Open kdesysadmin opened this issue 7 years ago • 9 comments

As part of our Continuous Integration system it seems that certain unit tests we run require the CAP_SYS_PTRACE capability to be retained, something Docker drops by default. While Docker allows specifying which capabilities to keep, this plugin unfortunately doesn't have such an option.

As we'd like to be able to support these unit tests properly, could the ability to keep certain specified Capabilities please be added? For our purposes using privileged containers isn't workable.

kdesysadmin avatar Apr 13 '17 20:04 kdesysadmin

https://github.com/KostyaSha/yet-another-docker-plugin/blob/master/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/commons/DockerCreateContainer.java + config.groovy

But it depends on https://github.com/docker-java/docker-java/blob/master/src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java and https://github.com/docker-java/docker-java/blob/master/src/main/java/com/github/dockerjava/api/model/Capability.java Seems for jenkins we need also enum

KostyaSha avatar Apr 13 '17 20:04 KostyaSha

Sorry, i'm not sure what you mean here - is this something which can be scripted using Groovy that i've missed?

kdesysadmin avatar Apr 13 '17 20:04 kdesysadmin

No, YAD needs additional createcontainer options that available in docker-java

KostyaSha avatar Apr 13 '17 20:04 KostyaSha

Okay. Will we need to find someone to work on this (ie. do you have plans to implement this at some point)?

kdesysadmin avatar Apr 13 '17 21:04 kdesysadmin

Sorry, very busy. I plan to go through issues soon and resolve as much as i can.

KostyaSha avatar Apr 14 '17 00:04 KostyaSha

Not a problem. If we can provide a patch / PR will that make things easier?

kdesysadmin avatar Apr 14 '17 01:04 kdesysadmin

feel free to popup if you still need it.

KostyaSha avatar Sep 06 '17 01:09 KostyaSha

This change is something we are very much still interested in yes.

bcooksley avatar Sep 06 '17 08:09 bcooksley

same problem here. any updates?

timosachsenberg avatar Mar 01 '21 13:03 timosachsenberg