{"record":{"id":"ae8ef65d4a3d53b7","repo":"nektos/act","slug":"conflicting-options-cannot-specify-both-network","errorCode":null,"errorMessage":"conflicting options: cannot specify both --network-alias and per-network alias","messagePattern":"conflicting options: cannot specify both --network-alias and per-network alias","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":820,"sourceCode":"\t\t// and only a single network is specified, omit the endpoint-configuration\n\t\t// on the client (the daemon will still create it when creating the container)\n\t\tif i == 0 && len(copts.netMode.Value()) == 1 {\n\t\t\tif ep == nil || reflect.ValueOf(*ep).IsZero() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tendpoints[n.Target] = ep\n\t}\n\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())","sourceCodeStart":802,"sourceCodeEnd":838,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L802-L838","documentation":"Error [93]: In copyDir, CopyToContainer of the whole-workspace tar (destination '/') failed after a successful seek. This uploads the project directory into the job container. Wrapped causes: stream too large/timeout, container died, ENOSPC, or daemon API errors on big payloads.","triggerScenarios":"Uploading a large workspace (many files, big node_modules/vendor dirs) where the daemon stream breaks; container exited during upload; host overlay disk full; remote DOCKER_HOST with bandwidth limits dropping the hijacked stream.","commonSituations":"Forgetting .gitignore coverage so build outputs get tarred; huge .git history; running act over ssh-tunneled docker sockets on slow links; CI runners with disk pressure.","solutions":["Add large dirs to .gitignore (copyDir honors it): node_modules/, dist/, target/, .git kept as needed — or clean the workspace before act","Check disk on host: df -h; prune: docker system prune -a\nIncrease daemon max request size / use a local socket instead of tcp","Re-run — if it fails at a consistent size, it's disk or payload; if randomly, it's the connection"],"exampleFix":"# before: giant untracked dirs shipped into container\n# after: .gitignore\tnode_modules/\n.gitignore\tdist/\n.gitignore\ttarget/","handlingStrategy":"fallback","validationCode":"// Estimate workspace size before act\ncmd := exec.Command(\"du\", \"-sh\", \".\")\nout, _ := cmd.Output() // warn above a threshold (e.g. >500M)","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"failed to copy content to container\") && isBigWorkspace {\n\t// fall back: archive with tar externally and docker cp, or reduce workspace\n}","preventionTips":["gitignore build outputs (node_modules, dist, target) — copyDir honors .gitignore","Prefer local unix socket for large uploads","Keep .git history lean or shallow-clone in CI"],"tags":["docker","copy","workspace","performance","disk"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}