{"record":{"id":"c6a01454d5283fb5","repo":"nektos/act","slug":"no-healthcheck-conflicts-with-health-options","errorCode":null,"errorMessage":"--no-healthcheck conflicts with --health-* options","messagePattern":"--no-healthcheck conflicts with --health-\\* options","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":577,"sourceCode":"\n\tsecurityOpts, maskedPaths, readonlyPaths := parseSystemPaths(securityOpts)\n\n\tstorageOpts, err := parseStorageOpts(copts.storageOpt.GetSlice())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Healthcheck\n\tvar healthConfig *container.HealthConfig\n\thaveHealthSettings := copts.healthCmd != \"\" ||\n\t\tcopts.healthInterval != 0 ||\n\t\tcopts.healthTimeout != 0 ||\n\t\tcopts.healthStartPeriod != 0 ||\n\t\tcopts.healthRetries != 0 ||\n\t\tcopts.healthStartInterval != 0\n\tif copts.noHealthcheck {\n\t\tif haveHealthSettings {\n\t\t\treturn nil, errors.New(\"--no-healthcheck conflicts with --health-* options\")\n\t\t}\n\t\thealthConfig = &container.HealthConfig{Test: []string{\"NONE\"}}\n\t} else if haveHealthSettings {\n\t\tvar probe []string\n\t\tif copts.healthCmd != \"\" {\n\t\t\tprobe = []string{\"CMD-SHELL\", copts.healthCmd}\n\t\t}\n\t\tif copts.healthInterval < 0 {\n\t\t\treturn nil, errors.New(\"--health-interval cannot be negative\")\n\t\t}\n\t\tif copts.healthTimeout < 0 {\n\t\t\treturn nil, errors.New(\"--health-timeout cannot be negative\")\n\t\t}\n\t\tif copts.healthRetries < 0 {\n\t\t\treturn nil, errors.New(\"--health-retries cannot be negative\")\n\t\t}\n\t\tif copts.healthStartPeriod < 0 {\n\t\t\treturn nil, errors.New(\"--health-start-period cannot be negative\")","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L559-L595","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before: entrypoint exits, later execs fail\n$ docker logs act-job  # exits immediately\n# after: fix entrypoint/cmd in workflow or base image, then re-run\n$ act -j job","handlingStrategy":"try-catch","validationCode":"// Ensure container is running before exec\nif c, _ := cli.ContainerInspect(ctx, id); !c.State.Running {\n\treturn errors.New(\"container not running; check docker logs\")\n}","typeGuard":null,"tryCatchPattern":"if err := exec(ctx); err != nil && strings.Contains(err.Error(), \"failed to create exec\") {\n\tif c, _ := cli.ContainerInspect(ctx, id); c.State.ExitCode != 0 {\n\t\tlogs, _ := cli.ContainerLogs(ctx, id, client.ContainerLogsOptions{ShowStdout: true, ShowStderr: true})\n\t\tdefer logs.Close() // read + surface\n\t}\n}","preventionTips":["Fix crash-on-start entrypoints before running steps","Verify overridden container users exist in the image","Check docker info before long batch runs"],"tags":["docker","exec","container-lifecycle","api"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}