-
Notifications
You must be signed in to change notification settings - Fork 855
Improve logging when container fails to start #5993
Copy link
Copy link
Closed
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationarea-orchestrator
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
If you create a container with a bad image name (or any other scenario in which the container fails to start), it can be hard to troublehsoot why this is the case.
The container on the dashboard gets marked as "Failed to start"

But nothing shows in the dashboard logs to help you work out why the container fails to start

If you look at the app host console output, you do get some logs, but these are easy to miss - especially if you have a lot going on and the error gets quickly supersceeded by others.
fail: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0]
could not create the container {"Container": {"name":"mycontainer-xgdnxzrc"}, "Reconciliation": 3, "error": "docker command 'CreateContainer' returned with non-zero exit code 1: command output: Stdout: '' Stderr: 'Unable to find image 'docker.io/fake/does/not/exist:bad-tag' locally\nError response from daemon: manifest for docker.io/fake/does/not/exist:bad-tag not found: manifest unknown: manifest tagged by \"bad-tag\" is not found\n'"}
Describe the solution you'd like
I'd like to see the stdout and stderr from docker written to the console logs in the dashboard when a container fails to be created.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationarea-orchestrator
