nektos/act · error
--no-healthcheck conflicts with --health-* options
Error message
--no-healthcheck conflicts with --health-* options
What it means
Error [85]: The Docker ExecCreate API call failed while setting up a command execution inside the container (Exec). Act creates an exec instance with user/cmd/workingDir/env before attaching. Wrapped daemon errors include: container not running, bad user, or API incompatibility.
Source
Thrown at pkg/container/docker_cli.go:577
securityOpts, maskedPaths, readonlyPaths := parseSystemPaths(securityOpts)
storageOpts, err := parseStorageOpts(copts.storageOpt.GetSlice())
if err != nil {
return nil, err
}
// Healthcheck
var healthConfig *container.HealthConfig
haveHealthSettings := copts.healthCmd != "" ||
copts.healthInterval != 0 ||
copts.healthTimeout != 0 ||
copts.healthStartPeriod != 0 ||
copts.healthRetries != 0 ||
copts.healthStartInterval != 0
if copts.noHealthcheck {
if haveHealthSettings {
return nil, errors.New("--no-healthcheck conflicts with --health-* options")
}
healthConfig = &container.HealthConfig{Test: []string{"NONE"}}
} 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")View on GitHub (pinned to 4f41128141)
Solutions
- Check 'docker ps -a' — if the act job container exited immediately, inspect its logs: docker logs <container>
- Verify the container user exists in the image when overriding user
- Re-run: transient daemon restarts cause this; ensure docker info is healthy first
- Update Docker so daemon API >= the version act's client requests
Example fix
# before: entrypoint exits, later execs fail $ docker logs act-job # exits immediately # after: fix entrypoint/cmd in workflow or base image, then re-run $ act -j job
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure container is running before exec
if c, _ := cli.ContainerInspect(ctx, id); !c.State.Running {
return errors.New("container not running; check docker logs")
} Try / catch
if err := exec(ctx); err != nil && strings.Contains(err.Error(), "failed to create exec") {
if c, _ := cli.ContainerInspect(ctx, id); c.State.ExitCode != 0 {
logs, _ := cli.ContainerLogs(ctx, id, client.ContainerLogsOptions{ShowStdout: true, ShowStderr: true})
defer logs.Close() // read + surface
}
} Prevention
- Fix crash-on-start entrypoints before running steps
- Verify overridden container users exist in the image
- Check docker info before long batch runs
When it happens
Trigger: cr.cli.ExecCreate erroring because the target container exited or was removed before the exec, an invalid user name in input.User, or the container is paused/restarting so exec creation is rejected.
Common situations: Job container crashing at startup (bad entrypoint) so the first step's exec targets a dead container; --user set to a non-existent container user; Docker daemon restarting mid-run; race with docker rm of act containers.
Related errors
- --health-start-interval cannot be negative
- conflicting options: cannot specify both --link and per-netw
- conflicting options: cannot specify both --ip and per-networ
- conflicting options: cannot specify both --link-local-ip and
- --pid: invalid PID mode
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/c6a01454d5283fb5.
Report an issue: GitHub.