|
@@ -528,10 +528,10 @@ func (daemon *Daemon) getEntrypointAndArgs(configEntrypoint, configCmd []string)
|
|
|
return entrypoint, args
|
|
|
}
|
|
|
|
|
|
-func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
|
+func parseSecurityOpt(container *Container, config *runconfig.HostConfig) error {
|
|
|
var (
|
|
|
- label_opts []string
|
|
|
- err error
|
|
|
+ labelOpts []string
|
|
|
+ err error
|
|
|
)
|
|
|
|
|
|
for _, opt := range config.SecurityOpt {
|
|
@@ -541,7 +541,7 @@ func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
|
}
|
|
|
switch con[0] {
|
|
|
case "label":
|
|
|
- label_opts = append(label_opts, con[1])
|
|
|
+ labelOpts = append(labelOpts, con[1])
|
|
|
case "apparmor":
|
|
|
container.AppArmorProfile = con[1]
|
|
|
default:
|
|
@@ -549,7 +549,7 @@ func parseSecurityOpt(container *Container, config *runconfig.Config) error {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- container.ProcessLabel, container.MountLabel, err = label.InitLabels(label_opts)
|
|
|
+ container.ProcessLabel, container.MountLabel, err = label.InitLabels(labelOpts)
|
|
|
return err
|
|
|
}
|
|
|
|
|
@@ -583,7 +583,6 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, img *i
|
|
|
execCommands: newExecStore(),
|
|
|
}
|
|
|
container.root = daemon.containerRoot(container.ID)
|
|
|
- err = parseSecurityOpt(container, config)
|
|
|
return container, err
|
|
|
}
|
|
|
|