{"record":{"id":"a27dad9a7ba816f9","repo":"nektos/act","slug":"conflicting-options-cannot-specify-both-link-lo","errorCode":null,"errorMessage":"conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses","messagePattern":"conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":835,"sourceCode":"func applyContainerOptions(n *opts.NetworkAttachmentOpts, copts *containerOptions) error { //nolint:gocyclo\n\t// TODO should we error if _any_ advanced option is used? (i.e. forbid to combine advanced notation with the \"old\" flags (`--network-alias`, `--link`, `--ip`, `--ip6`)?\n\tif len(n.Aliases) > 0 && copts.aliases.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --network-alias and per-network alias\")\n\t}\n\tif len(n.Links) > 0 && copts.links.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --link and per-network links\")\n\t}\n\tif n.IPv4Address.IsValid() && copts.ipv4Address != nil {\n\t\treturn errors.New(\"conflicting options: cannot specify both --ip and per-network IPv4 address\")\n\t}\n\tif n.IPv6Address.IsValid() && copts.ipv6Address != nil {\n\t\treturn errors.New(\"conflicting options: cannot specify both --ip6 and per-network IPv6 address\")\n\t}\n\tif n.MacAddress != \"\" && copts.macAddress != \"\" {\n\t\treturn errors.New(\"conflicting options: cannot specify both --mac-address and per-network MAC address\")\n\t}\n\tif len(n.LinkLocalIPs) > 0 && copts.linkLocalIPs.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses\")\n\t}\n\tif copts.aliases.Len() > 0 {\n\t\tn.Aliases = make([]string, copts.aliases.Len())\n\t\tcopy(n.Aliases, copts.aliases.GetSlice())\n\t}\n\t// For a user-defined network, \"--link\" is an endpoint option, it creates an alias. But,\n\t// for the default bridge it defines a legacy-link.\n\tif container.NetworkMode(n.Target).IsUserDefined() && copts.links.Len() > 0 {\n\t\tn.Links = make([]string, copts.links.Len())\n\t\tcopy(n.Links, copts.links.GetSlice())\n\t}\n\tif copts.ipv4Address != nil {\n\t\tif ipv4, ok := netip.AddrFromSlice(copts.ipv4Address.To4()); ok {\n\t\t\tn.IPv4Address = ipv4\n\t\t}\n\t}\n\tif copts.ipv6Address != nil {\n\t\tif ipv6, ok := netip.AddrFromSlice(copts.ipv6Address.To16()); ok {","sourceCodeStart":817,"sourceCodeEnd":853,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L817-L853","documentation":"Error [98]: The job container's main process exited with a non-zero status code (from ContainerWait). This is act's job-level failure signal: the container command itself failed. The number printed is the container's exit status. Equivalent of the job 'failing' in real Actions — fix what the container runs.","triggerScenarios":"ContainerWait returning StatusCode != 0: entrypoint/workflow command failing inside the container (failing build, bad command, missing tool), or the container OOM-killed (137).","commonSituations":"CI-red builds reproduced locally; containers killed by OOM (exit 137) because act jobs default to no memory limit but host is short; entrypoint scripts exiting on error with set -e; missing env expected by the container's main command.","solutions":["docker logs <container> for the container's real stderr/stdout — the cause is printed there","If exit 137: free memory, close other containers, or add swap; check docker stats during run\nFix the failing command/entrypoint; test standalone with docker run --rm <image> <cmd>\nPass required env via workflow env: block if the container expects it"],"exampleFix":"# before: container command fails (exit 1)\n# after: reproduce to find cause\n$ docker run --rm -it <job-image> <container-cmd>","handlingStrategy":"try-catch","validationCode":"null // exit status is the workload's verdict; pre-validate only resources\n// e.g. check memory before job:\n// docker system df; free -m","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"exit with `FAILURE`: 137\") {\n\t// OOM: reduce parallelism/memory or add swap, then re-run\n} else if err != nil && strings.Contains(err.Error(), \"exit with `FAILURE`\") {\n\t// inspect docker logs <container> for the real error\n}","preventionTips":["Always check docker logs of the job container on this error","Watch docker stats for OOM (137) patterns","Reproduce container commands standalone before blaming act"],"tags":["docker","exit-code","job-failure","container-lifecycle"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}