{"record":{"id":"6e2a2814e5a07d71","repo":"docker/compose","slug":"opening-seccomp-profile-s-failed-w","errorCode":null,"errorMessage":"opening seccomp profile (%s) failed: %w","messagePattern":"opening seccomp profile \\((.+?)\\) failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compose/create.go","lineNumber":577,"sourceCode":"\t\tparsed     []string\n\t)\n\tfor _, opt := range securityOpts {\n\t\tif opt == \"systempaths=unconfined\" {\n\t\t\tunconfined = true\n\t\t\tcontinue\n\t\t}\n\t\tcon := strings.SplitN(opt, \"=\", 2)\n\t\tif len(con) == 1 && con[0] != \"no-new-privileges\" {\n\t\t\tif strings.Contains(opt, \":\") {\n\t\t\t\tcon = strings.SplitN(opt, \":\", 2)\n\t\t\t} else {\n\t\t\t\treturn securityOpts, false, fmt.Errorf(\"invalid security-opt: %q\", opt)\n\t\t\t}\n\t\t}\n\t\tif con[0] == \"seccomp\" && con[1] != \"unconfined\" && con[1] != \"builtin\" {\n\t\t\tf, err := os.ReadFile(p.RelativePath(con[1]))\n\t\t\tif err != nil {\n\t\t\t\treturn securityOpts, false, fmt.Errorf(\"opening seccomp profile (%s) failed: %w\", con[1], err)\n\t\t\t}\n\t\t\tb := bytes.NewBuffer(nil)\n\t\t\tif err := json.Compact(b, f); err != nil {\n\t\t\t\treturn securityOpts, false, fmt.Errorf(\"compacting json for seccomp profile (%s) failed: %w\", con[1], err)\n\t\t\t}\n\t\t\tparsed = append(parsed, fmt.Sprintf(\"seccomp=%s\", b.Bytes()))\n\t\t} else {\n\t\t\tparsed = append(parsed, opt)\n\t\t}\n\t}\n\n\treturn parsed, unconfined, nil\n}\n\n// defaultNetworkSettings determines the container.NetworkMode and corresponding network.NetworkingConfig (nil if not applicable).\nfunc defaultNetworkSettings(project *types.Project,\n\tservice types.ServiceConfig, serviceIndex int,\n\tlinks []string, useNetworkAliases bool,","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/compose/create.go#L559-L595","documentation":"Error \"opening seccomp profile (%s) failed: %w\" thrown in docker/compose.","triggerScenarios":"A seccomp profile referenced via security_opt (seccomp=<path>) could not be opened or read from the local filesystem.","commonSituations":"The profile file path is wrong, the file does not exist, or permissions prevent reading it.","solutions":["Check that the seccomp profile path exists and is readable on the host running the command.","Use an absolute path or a path relative to the project directory, and fix file permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}