{"id":"06c11abc5028b46f","repo":"docker/cli","slug":"s-is-not-a-valid-mac-address","errorCode":null,"errorMessage":"%s is not a valid mac address","messagePattern":"(.+?) is not a valid mac address","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/container/opts.go","lineNumber":352,"sourceCode":"\tNetworkingConfig *network.NetworkingConfig\n}\n\n// parse parses the args for the specified command and generates a Config,\n// a HostConfig and returns them with the specified command.\n// If the specified args are not valid, it will return an error.\n//\n//nolint:gocyclo\nfunc parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*containerConfig, error) {\n\tvar (\n\t\tattachStdin  = copts.attach.Get(\"stdin\")\n\t\tattachStdout = copts.attach.Get(\"stdout\")\n\t\tattachStderr = copts.attach.Get(\"stderr\")\n\t)\n\n\t// Validate the input mac address\n\tif copts.macAddress != \"\" {\n\t\tif _, err := net.ParseMAC(strings.TrimSpace(copts.macAddress)); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"%s is not a valid mac address\", copts.macAddress)\n\t\t}\n\t}\n\tif copts.stdin {\n\t\tattachStdin = true\n\t}\n\t// If -a is not set, attach to stdout and stderr\n\tif copts.attach.Len() == 0 {\n\t\tattachStdout = true\n\t\tattachStderr = true\n\t}\n\n\tvar err error\n\n\tswappiness := copts.swappiness\n\tif swappiness != -1 && (swappiness < 0 || swappiness > 100) {\n\t\treturn nil, fmt.Errorf(\"invalid value: %d. Valid memory swappiness range is 0-100\", swappiness)\n\t}\n","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/container/opts.go#L334-L370","documentation":"Error \"%s is not a valid mac address\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/container/opts.go:352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}