{"record":{"id":"ad3cb927ff8662f9","repo":"microsoft/aspire","slug":"containerruntime-name-is-not-running-start-containerruntime","errorCode":null,"errorMessage":"{containerRuntime.Name} is not running. Start {containerRuntime.Name} and try again.","messagePattern":"(.+?) is not running\\. Start (.+?) and try again\\.","errorType":"exception","errorClass":"DistributedApplicationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs","lineNumber":210,"sourceCode":"                        waitCts.CancelAfter(TimeSpan.FromMinutes(5));\n\n                        try\n                        {\n                            while (!await containerRuntime.CheckIfRunningAsync(waitCts.Token).ConfigureAwait(false))\n                            {\n                                await Task.Delay(TimeSpan.FromSeconds(2), timeProvider, waitCts.Token).ConfigureAwait(false);\n                            }\n\n                            return;\n                        }\n                        catch (OperationCanceledException) when (!context.CancellationToken.IsCancellationRequested)\n                        {\n                            // Timed out waiting for the runtime to start — fall through to the error below\n                        }\n                    }\n                }\n\n                throw new DistributedApplicationException(\n                    $\"{containerRuntime.Name} is not running. Start {containerRuntime.Name} and try again.\");\n            }\n        });\n\n        // Add a default \"Push\" meta-step that all push steps should be required by\n        // Push unconditionally depends on PushPrereq to ensure annotations are set up\n        var pushStep = new PipelineStep\n        {\n            Name = WellKnownPipelineSteps.Push,\n            Description = \"Aggregation step for all push operations. All push steps should be required by this step.\",\n            Action = _ => Task.CompletedTask\n        };\n        pushStep.DependsOn(WellKnownPipelineSteps.PushPrereq);\n        _steps.Add(pushStep);\n\n        _steps.Add(new PipelineStep\n        {\n            Name = WellKnownPipelineSteps.PushPrereq,","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Pipelines/DistributedApplicationPipeline.cs#L192-L228","documentation":"During the pipeline's push prerequisites step, Aspire checks that the configured container runtime (Docker or Podman) is reachable/running. If the runtime fails to start or connect within the wait window, it throws DistributedApplicationException telling you to start the runtime before retrying. No image build/push can proceed without a working container runtime.","triggerScenarios":"Executing a pipeline with container build/push steps when `docker info`/`podman info` fails or the runtime daemon isn't started; the code waits for the runtime to start, times out, and falls through to this throw.","commonSituations":"Docker Desktop not launched on Windows/macOS, podman machine not started (`podman machine init && podman machine start`), Docker daemon crashed, running in a container/CI without the Docker socket mounted, or DOCKER_HOST pointing at an unreachable endpoint.","solutions":["Start your container runtime: launch Docker Desktop or run `sudo systemctl start docker`, or `podman machine start` for Podman.","Verify connectivity with `docker info` (or `podman info`) before rerunning the pipeline.","Check DOCKER_HOST/CONTAINER_HOST environment variables point to a reachable daemon (e.g. mount /var/run/docker.sock in CI containers).","On Linux, ensure your user is in the docker group or has permission to the daemon socket."],"exampleFix":"// before (terminal)\naspire publish  # fails: Docker is not running\n\n// after (terminal)\nsudo systemctl start docker   # or: open Docker Desktop / podman machine start\ndocker info                   # verify daemon is up\naspire publish","handlingStrategy":"validation","validationCode":"var runtime = args.Contains(\"--podman\") ? \"podman\" : \"docker\";\nvar psi = new ProcessStartInfo(runtime, \"info\") { RedirectStandardOutput = true };\nusing var p = Process.Start(psi)!;\nawait p.WaitForExitAsync();\nif (p.ExitCode != 0) throw new InvalidOperationException($\"{runtime} daemon is not reachable; start it before running the pipeline.\");","typeGuard":"bool IsRuntimeReachable(string runtime)\n{\n    try { using var p = Process.Start(new ProcessStartInfo(runtime, \"info\") { RedirectStandardOutput = true }); p!.WaitForExit(5000); return p.ExitCode == 0; }\n    catch { return false; }\n}","tryCatchPattern":"try\n{\n    await pipeline.RunAsync(context);\n}\ncatch (DistributedApplicationException ex) when (ex.Message.Contains(\"is not running\"))\n{\n    logger.LogError(\"Start the container runtime (Docker Desktop / podman machine start) and retry.\");\n}","preventionTips":["Start Docker Desktop or podman machine before dev/deploy sessions","Add a pre-flight `docker info` / `podman info` check to CI jobs","In CI containers, mount the Docker socket or configure DOCKER_HOST correctly","Ensure your user has daemon socket permissions (docker group on Linux)"],"tags":["docker","podman","container-runtime","environment"],"backgroundTag":"connection-refused","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}