mirror of
https://gitea.elkins.co/Networking/ccl.git
synced 2025-03-04 09:18:48 -06:00
Add privileged and cap-add options
This commit is contained in:
parent
be45ec65f9
commit
1a4376db22
@ -66,6 +66,8 @@ type Container struct {
|
||||
NetNS string `toml:"netns,omitempty"`
|
||||
StartGroup int `toml:"group,omitempty"`
|
||||
Devices []string `toml:"devices,omitempty"`
|
||||
CapAdd []string `toml:"cap_add,omitempty"`
|
||||
Privileged null.Bool `toml:"privileged,omitempty"`
|
||||
|
||||
conn context.Context
|
||||
getCData func() *define.InspectContainerData
|
||||
@ -241,8 +243,10 @@ func (c *Container) CreateCommands() cmd.Set {
|
||||
NetNS: specgen.Namespace{NSMode: specgen.NamespaceMode(c.NetNS)},
|
||||
},
|
||||
ContainerSecurityConfig: specgen.ContainerSecurityConfig{
|
||||
User: c.User,
|
||||
Umask: fmt.Sprintf("%#o", c.Umask.Int64),
|
||||
User: c.User,
|
||||
Umask: fmt.Sprintf("%#o", c.Umask.Int64),
|
||||
CapAdd: c.CapAdd,
|
||||
Privileged: c.Privileged.ValueOrZero(),
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user