nektos/act · error
conflicting options: cannot specify both --network-alias and
Error message
conflicting options: cannot specify both --network-alias and per-network alias
What it means
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.
Source
Thrown at pkg/container/docker_cli.go:820
// and only a single network is specified, omit the endpoint-configuration
// on the client (the daemon will still create it when creating the container)
if i == 0 && len(copts.netMode.Value()) == 1 {
if ep == nil || reflect.ValueOf(*ep).IsZero() {
continue
}
}
endpoints[n.Target] = ep
}
if hasUserDefined && hasNonUserDefined {
return nil, errors.New("conflicting options: cannot attach both user-defined and non-user-defined network-modes")
}
return endpoints, nil
}
func applyContainerOptions(n *opts.NetworkAttachmentOpts, copts *containerOptions) error { //nolint:gocyclo
// 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`)?
if len(n.Aliases) > 0 && copts.aliases.Len() > 0 {
return errors.New("conflicting options: cannot specify both --network-alias and per-network alias")
}
if len(n.Links) > 0 && copts.links.Len() > 0 {
return errors.New("conflicting options: cannot specify both --link and per-network links")
}
if n.IPv4Address.IsValid() && copts.ipv4Address != nil {
return errors.New("conflicting options: cannot specify both --ip and per-network IPv4 address")
}
if n.IPv6Address.IsValid() && copts.ipv6Address != nil {
return errors.New("conflicting options: cannot specify both --ip6 and per-network IPv6 address")
}
if n.MacAddress != "" && copts.macAddress != "" {
return errors.New("conflicting options: cannot specify both --mac-address and per-network MAC address")
}
if len(n.LinkLocalIPs) > 0 && copts.linkLocalIPs.Len() > 0 {
return errors.New("conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses")
}
if copts.aliases.Len() > 0 {
n.Aliases = make([]string, copts.aliases.Len())View on GitHub (pinned to 4f41128141)
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 Increase 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
Example fix
# before: giant untracked dirs shipped into container # after: .gitignore node_modules/ .gitignore dist/ .gitignore target/
Defensive patterns
Strategy: fallback
Validate before calling
// Estimate workspace size before act
cmd := exec.Command("du", "-sh", ".")
out, _ := cmd.Output() // warn above a threshold (e.g. >500M) Try / catch
if err != nil && strings.Contains(err.Error(), "failed to copy content to container") && isBigWorkspace {
// fall back: archive with tar externally and docker cp, or reduce workspace
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- conflicting options: cannot specify both --restart and --rm
- --health-start-interval cannot be negative
- conflicting options: cannot specify both --link and per-netw
- --pid: invalid PID mode
- --uts: invalid UTS mode
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/ae8ef65d4a3d53b7.
Report an issue: GitHub.