Use : to split caps in sysinit flags
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
parent
47917135da
commit
50b580cfec
2 changed files with 4 additions and 4 deletions
|
@ -123,11 +123,11 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
|
|||
}
|
||||
|
||||
if len(c.CapAdd) > 0 {
|
||||
params = append(params, "-cap-add", strings.Join(c.CapAdd, ","))
|
||||
params = append(params, fmt.Sprintf("-cap-add=%s", strings.Join(c.CapAdd, ":")))
|
||||
}
|
||||
|
||||
if len(c.CapDrop) > 0 {
|
||||
params = append(params, "-cap-drop", strings.Join(c.CapDrop, ","))
|
||||
params = append(params, fmt.Sprintf("-cap-drop=%s", strings.Join(c.CapDrop, ":")))
|
||||
}
|
||||
|
||||
params = append(params, "--", c.Entrypoint)
|
||||
|
|
|
@ -55,10 +55,10 @@ func finalizeNamespace(args *execdriver.InitArgs) error {
|
|||
)
|
||||
|
||||
if args.CapAdd != "" {
|
||||
adds = strings.Split(args.CapAdd, ",")
|
||||
adds = strings.Split(args.CapAdd, ":")
|
||||
}
|
||||
if args.CapDrop != "" {
|
||||
drops = strings.Split(args.CapDrop, ",")
|
||||
drops = strings.Split(args.CapDrop, ":")
|
||||
}
|
||||
|
||||
caps, err := execdriver.TweakCapabilities(container.Capabilities, adds, drops)
|
||||
|
|
Loading…
Add table
Reference in a new issue