introduce run --cap-add to run maintenance commands using service image#10669
introduce run --cap-add to run maintenance commands using service image#10669
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v2 #10669 +/- ##
==========================================
+ Coverage 58.89% 58.92% +0.03%
==========================================
Files 112 112
Lines 9735 9749 +14
==========================================
+ Hits 5733 5745 +12
- Misses 3413 3414 +1
- Partials 589 590 +1
☔ View full report in Codecov by Sentry. |
75cd559 to
aae5d87
Compare
Note that // DefaultCapabilities returns a Linux kernel default capabilities
func DefaultCapabilities() []string {
return []string{
"CAP_CHOWN",
"CAP_DAC_OVERRIDE",
"CAP_FSETID",
"CAP_FOWNER",
"CAP_MKNOD",
"CAP_NET_RAW",
"CAP_SETGID",
"CAP_SETUID",
"CAP_SETFCAP",
"CAP_SETPCAP",
"CAP_NET_BIND_SERVICE",
"CAP_SYS_CHROOT",
"CAP_KILL",
"CAP_AUDIT_WRITE",
}
} |
|
If we add this for parity with |
|
sure we could. There's no obvious use-case for it, but that would make sense in terms of CLI homogeneity |
8cac5f2 to
c8bceb4
Compare
sure, but if you have |
|
I need to check how this interact with existing cap set in service, i.e. have service set with |
I would expect that commandline > compose file. |
Signed-off-by: Nicolas De Loof <[email protected]>
What I did
introduce
docker run --cap-addflag so user can get extra privileges to run maintenance commands without the need for an init container (which doesn't yet have a user-friendly support in compose file format)Related issue
fixed #10655
(not mandatory) A picture of a cute animal, if possible in relation to what you did