{"record":{"id":"b3b53a81ba33f6d3","repo":"nektos/act","slug":"conflicting-options-cannot-specify-both-ip6-and","errorCode":null,"errorMessage":"conflicting options: cannot specify both --ip6 and per-network IPv6 address","messagePattern":"conflicting options: cannot specify both --ip6 and per-network IPv6 address","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":829,"sourceCode":"\tif hasUserDefined && hasNonUserDefined {\n\t\treturn nil, errors.New(\"conflicting options: cannot attach both user-defined and non-user-defined network-modes\")\n\t}\n\treturn endpoints, nil\n}\n\nfunc 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 {","sourceCodeStart":811,"sourceCodeEnd":847,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L811-L847","documentation":"Error [96]: ContainerStart failed — the Docker daemon refused to start the created job container. The wrapped daemon error identifies the cause: conflicting port bindings, bad network, missing image entrypoint, OCI runtime errors (exec format wrong for host arch), or host config the daemon rejects at start time.","triggerScenarios":"ContainerStart erroring: port already allocated (host port conflicts), network specified in options doesn't exist, image entrypoint missing executable, binary architecture mismatch without emulation (exec format error), SELinux/AppArmor denial.","commonSituations":"--container-options '--network=foo' where foo was deleted; two act jobs binding the same host port; running arm64 images on x86 without qemu binfmt; enterprise hardening (SELinux) blocking container start.","solutions":["Read the wrapped message verbatim — it is the daemon's diagnosis (port/network/OCI)","Fix or remove conflicting options: create the network (docker network create foo) or drop the port binds","For cross-arch: docker run --privileged --rm tonistiigi/binfmt --install all then re-run act\nIf SELinux denies: adjust label options or host policy"],"exampleFix":"# before: missing network\nact --container-options \"--network=my-net\"\n# after\n$ docker network create my-net && act --container-options \"--network=my-net\"","handlingStrategy":"validation","validationCode":"// Pre-flight the options that break start\n// network exists?\nif _, err := cli.NetworkInspect(ctx, netName, client.NetworkInspectOptions{}); err != nil { log.Fatal(\"network missing\") }\n// host ports free?\nfor _, p := range usedHostPorts { if !portFree(p) { log.Fatalf(\"port %s in use\", p) } }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"failed to start container\") {\n\t// wrapped daemon text after the colon is authoritative: port/network/OCI; fix that specific cause\n}","preventionTips":["Create custom networks before referencing them in options","Avoid duplicate host port bindings across parallel act jobs","Install qemu binfmt before running foreign-arch images"],"tags":["docker","container-start","daemon","runtime"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}