Skip to content

Container start failures due to missing executables in container don't show in the dashboard. #4792

@mitchdenny

Description

@mitchdenny

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

If I start a container and the EXEC command that I have in the Dockerfile doesn't find an executable the container will fail to launch and the underlying error from the container runtime won't be shown in the portal.

Expected Behavior

No response

Steps To Reproduce

Use this Dockerfile

FROM ubuntu
RUN echo hello-world
CMD [ "doestnotexist", "42" ]

And this apphost:

var builder = DistributedApplication.CreateBuilder(args);

builder.AddDockerfile("mycontainer", ".");

builder.Build().Run();

When you run it you'll get this in your console logs for the AppHost:

fail: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0]
      could not start the container	{"Container": {"name":"ddd-rttkcvtp"}, "Reconciliation": 5, "ContainerID": "2da792a7c27aefff14ba96eb5bd75c4d404d25783cce3a5c008a81e6ccf6d1cf", "error": "docker command 'StartContainers' returned with non-zero exit code 1: command output: Stdout: '' Stderr: 'Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"doestnotexist\": executable file not found in $PATH: unknown\nError: failed to start containers: 2da792a7c27aefff14ba96eb5bd75c4d404d25783cce3a5c008a81e6ccf6d1cf\n'"}

But the dashboard will only show the output for the image pull for the base image.

Exceptions (if any)

No response

.NET Version info

.NET SDK:
Version: 8.0.105
Commit: eae90abaaf
Workload version: 8.0.100-manifests.b4a94546

Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: ubuntu.22.04-x64
Base Path: /usr/lib/dotnet/sdk/8.0.105/

.NET workloads installed:
Workload version: 8.0.100-manifests.b4a94546
[aspire]
Installation Source: SDK 8.0.100
Manifest Version: 8.1.0-preview.1.24353.12/8.0.100
Manifest Path: /home/mitch/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.1.0-preview.1.24353.12/WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.5
Architecture: x64
Commit: 087e15321b

.NET SDKs installed:
7.0.119 [/usr/lib/dotnet/sdk]
8.0.105 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.19 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.19 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Anything else?

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions