We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d5ed037 + ccbe206 commit 931f7a1Copy full SHA for 931f7a1
cli/command/container/opts.go
@@ -947,11 +947,11 @@ func parseSecurityOpts(securityOpts []string) ([]string, error) {
947
if err != nil {
948
return securityOpts, fmt.Errorf("opening seccomp profile (%s) failed: %w", v, err)
949
}
950
- b := bytes.NewBuffer(nil)
951
- if err := json.Compact(b, f); err != nil {
+ var b bytes.Buffer
+ if err := json.Compact(&b, f); err != nil {
952
return securityOpts, fmt.Errorf("compacting json for seccomp profile (%s) failed: %w", v, err)
953
954
- securityOpts[key] = fmt.Sprintf("seccomp=%s", b.Bytes())
+ securityOpts[key] = "seccomp=" + b.String()
955
956
957
0 commit comments