{"record":{"id":"a0367b230774d4ad","repo":"nektos/act","slug":"invalid-logging-opts-for-driver-s","errorCode":null,"errorMessage":"invalid logging opts for driver %s","messagePattern":"invalid logging opts for driver (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":930,"sourceCode":"\t\t\tfor param := range strings.SplitSeq(publish, \",\") {\n\t\t\t\tk, v, ok := strings.Cut(param, \"=\")\n\t\t\t\tif !ok || k == \"\" {\n\t\t\t\t\treturn optsList, fmt.Errorf(\"invalid publish opts format (should be name=value but got '%s')\", param)\n\t\t\t\t}\n\t\t\t\tparams[k] = v\n\t\t\t}\n\t\t\toptsList = append(optsList, fmt.Sprintf(\"%s:%s/%s\", params[\"published\"], params[\"target\"], params[\"protocol\"]))\n\t\t} else {\n\t\t\toptsList = append(optsList, publish)\n\t\t}\n\t}\n\treturn optsList, nil\n}\n\nfunc parseLoggingOpts(loggingDriver string, loggingOpts []string) (map[string]string, error) {\n\tloggingOptsMap := opts.ConvertKVStringsToMap(loggingOpts)\n\tif loggingDriver == \"none\" && len(loggingOpts) > 0 {\n\t\treturn map[string]string{}, fmt.Errorf(\"invalid logging opts for driver %s\", loggingDriver)\n\t}\n\treturn loggingOptsMap, nil\n}\n\n// takes a local seccomp daemon, reads the file contents for sending to the daemon\nfunc parseSecurityOpts(securityOpts []string) ([]string, error) {\n\tfor key, opt := range securityOpts {\n\t\tk, v, ok := strings.Cut(opt, \"=\")\n\t\tif !ok && k != \"no-new-privileges\" {\n\t\t\tk, v, ok = strings.Cut(opt, \":\")\n\t\t}\n\t\tif (!ok || v == \"\") && k != \"no-new-privileges\" {\n\t\t\t// \"no-new-privileges\" is the only option that does not require a value.\n\t\t\treturn securityOpts, fmt.Errorf(\"invalid --security-opt: %q\", opt)\n\t\t}\n\t\tif k == \"seccomp\" {\n\t\t\tswitch v {\n\t\t\tcase seccompProfileDefault, seccompProfileUnconfined:","sourceCodeStart":912,"sourceCodeEnd":948,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L912-L948","documentation":"parseLoggingOpts rejects any --log-opt flags when the logging driver is 'none'. The 'none' driver discards logs and takes no options by definition, matching Docker CLI behavior, so combining '--log-driver none' with any '--log-opt k=v' fails container option parsing.","triggerScenarios":"Passing options like '--log-driver none --log-opt max-size=10m' in a job's container options or act's docker arguments. Detected client-side before the daemon call.","commonSituations":"Copy-pasting a base options set that includes log-opts while switching the driver to none; trying to silence container logs but keeping tuning flags; template fragments merged from different services.","solutions":["Remove all --log-opt flags when using --log-driver none","Or switch to a driver that accepts options: --log-driver json-file --log-opt max-size=10m","Audit combined option strings for leftover log-opts"],"exampleFix":"# before\noptions: --log-driver none --log-opt max-size=10m\n\n# after\noptions: --log-driver none","handlingStrategy":"validation","validationCode":"if loggingDriver == \"none\" && len(loggingOpts) > 0 {\n    return fmt.Errorf(\"driver 'none' takes no --log-opt values\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never pair --log-driver none with --log-opt","Keep option templates per-driver instead of one shared blob","When silencing logs, strip all log-opts in the same edit"],"tags":["docker","logging","validation","container-options","act"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}