mirror of https://github.com/docker/cli.git
api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
82804cc8e5
commit
123d33d81d
|
@ -172,16 +172,21 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
|
||||||
fmt.Fprintf(dockerCli.Out(), "\n")
|
fmt.Fprintf(dockerCli.Out(), "\n")
|
||||||
}
|
}
|
||||||
if len(info.SecurityOptions) != 0 {
|
if len(info.SecurityOptions) != 0 {
|
||||||
|
kvs, err := types.DecodeSecurityOptions(info.SecurityOptions)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
fmt.Fprintf(dockerCli.Out(), "Security Options:\n")
|
fmt.Fprintf(dockerCli.Out(), "Security Options:\n")
|
||||||
for _, o := range info.SecurityOptions {
|
for _, so := range kvs {
|
||||||
switch o.Key {
|
fmt.Fprintf(dockerCli.Out(), " %s\n", so.Name)
|
||||||
case "Name":
|
for _, o := range so.Options {
|
||||||
fmt.Fprintf(dockerCli.Out(), " %s\n", o.Value)
|
switch o.Key {
|
||||||
case "Profile":
|
case "profile":
|
||||||
if o.Value != "default" {
|
if o.Value != "default" {
|
||||||
fmt.Fprintf(dockerCli.Err(), " WARNING: You're not using the default seccomp profile\n")
|
fmt.Fprintf(dockerCli.Err(), " WARNING: You're not using the default seccomp profile\n")
|
||||||
|
}
|
||||||
|
fmt.Fprintf(dockerCli.Out(), " Profile: %s\n", o.Value)
|
||||||
}
|
}
|
||||||
fmt.Fprintf(dockerCli.Out(), " %s: %s\n", o.Key, o.Value)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue