nektos/act · error
--health-start-interval cannot be negative
Error message
--health-start-interval cannot be negative
What it means
Error [90]: Before copying a tar stream into the container at destPath, act first sends a synthetic tar directory entry to '/' via CopyToContainer to create the destination directory. That mkdir-by-tar API call failed. Causes: container not running, daemon error during upload, or filesystem errors in the container (read-only rootfs, full disk).
Source
Thrown at pkg/container/docker_cli.go:598
} else if haveHealthSettings {
var probe []string
if copts.healthCmd != "" {
probe = []string{"CMD-SHELL", copts.healthCmd}
}
if copts.healthInterval < 0 {
return nil, errors.New("--health-interval cannot be negative")
}
if copts.healthTimeout < 0 {
return nil, errors.New("--health-timeout cannot be negative")
}
if copts.healthRetries < 0 {
return nil, errors.New("--health-retries cannot be negative")
}
if copts.healthStartPeriod < 0 {
return nil, errors.New("--health-start-period cannot be negative")
}
if copts.healthStartInterval < 0 {
return nil, errors.New("--health-start-interval cannot be negative")
}
healthConfig = &container.HealthConfig{
Test: probe,
Interval: copts.healthInterval,
Timeout: copts.healthTimeout,
StartPeriod: copts.healthStartPeriod,
StartInterval: copts.healthStartInterval,
Retries: copts.healthRetries,
}
}
deviceRequests := copts.gpus.Value()
if len(cdiDeviceNames) > 0 {
cdiDeviceRequest := container.DeviceRequest{
Driver: "cdi",
DeviceIDs: cdiDeviceNames,
}View on GitHub (pinned to 4f41128141)
Solutions
- Check container state: docker ps -a --filter name=act — restart/freed? then inspect logs for the crash cause
- Remove '--read-only' from container options if present
- Check host disk space: df -h (overlay2 lives on host)
- Re-run after cleaning leftover containers: docker rm -f $(docker ps -aq --filter name=act-)
Example fix
# before act --container-options "--read-only" # after act --container-options ""
Defensive patterns
Strategy: validation
Validate before calling
// Verify container is running and writable before copying
info, _ := cli.ContainerInspect(ctx, id)
if !info.State.Running { return errors.New("container not running") }
if info.HostConfig != nil && info.HostConfig.ReadonlyRootfs { return errors.New("rootfs read-only") } Try / catch
if err != nil && strings.Contains(err.Error(), "failed to mkdir to copy content") {
// inspect container state + logs; readonly rootfs and dead containers are the usual causes
} Prevention
- Don't pass --read-only in container options to act
- Free host disk before large jobs (df -h)
- Clean dead act containers between runs
When it happens
Trigger: cr.cli.CopyToContainer with the TypeDir tar header failing: target container exited/paused between exec and copy, container root filesystem is read-only (readonly rootfs in options), disk full inside container, or API/stream error to daemon.
Common situations: Actions like actions/checkout or file-copy steps against a job container that crashed earlier; --container-options with --read-only; overlay2 disk exhaustion on the host; container in 'Dead' state after OOM.
Related errors
- conflicting options: cannot specify both --link and per-netw
- --no-healthcheck conflicts with --health-* options
- conflicting options: cannot specify both --restart and --rm
- conflicting options: cannot attach both user-defined and non
- conflicting options: cannot specify both --network-alias and
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/45acec902c7dc5d6.
Report an issue: GitHub.