Better error message needed for too old Docker CLI after updating to Aspire 13.5.0
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
I have been trying to update our AWS components for Aspire to 13.5.0 and been debugging an issue with our release pipeline. I was getting the following error message about the container runtime being unhealthy which I knew was not true.
```
Aspire.Hosting.DistributedApplicationException: Container runtime 'docker' was found but appears to be unhealthy. Ensure that Docker is running and that the Docker daemon is accessible. If Resource Saver mode is enabled, containers may not run.
at Aspire.Hosting.Dcp.DcpDependencyCheck.CheckDcpInfoAndLogErrors(ILogger logger, DcpOptions options, DcpInfo dcpInfo, Boolean throwIfUnhealthy) in /_/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 262
at Aspire.Hosting.Dcp.DcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpHost.cs:line 126
at Aspire.Hosting.Dcp.DcpHost.StartAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Dcp/DcpHost.cs:line 80
at Aspire.Hosting.Orchestrator.OrchestratorHostService.StartAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting/Orchestrator/OrchestratorHostService.cs:line 39
at Microsoft.Extensions.Hosting.Internal.Host.b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
[xUnit.net 00:08:17.33] Aspire.Hosting.AWS.Integ.Tests.PlaygroundE2ETests.RunAWSAppHostProject [FAIL]
[xUnit.net 00:08:17.33] Aspire.Hosting.DistributedApplicationException : Container runtime 'docker' was found but appears to be unhealthy. Ensure that Docker is running and that the Docker daemon is accessible. If Resource Saver mode is enabled, containers may not run.
```
After quite a while of debugging I happened to enable the debug logging for the `Logging__LogLevel__Aspire.Hosting.Dcp` namespace and got the more useful error message
```
dbug: Aspire.Hosting.Dcp.DcpHost[0]
The error from the container runtime check was: docker CLI version 23.0.6 is not supported; DCP requires Docker CLI version 25.0.0 or newer
```
That information should have been in the logs without having to turn on debug level logging. Also I don't see the minimum version of the Docker CLI documented anywhere.
Contributor guide
Assessment
This issue has not been assessed yet.