{"record":{"id":"faa8ab1c784f806f","repo":"microsoft/aspire","slug":"result-errormessage-container-runtime-failed-to-inspect","errorCode":null,"errorMessage":"result.ErrorMessage ?? \"Container runtime failed to inspect image manifest '{imageReference}'.\"","messagePattern":"result\\.ErrorMessage \\?\\? \"Container runtime failed to inspect image manifest '(.+?)'\\.\"","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxContainerDeployment.cs","lineNumber":1017,"sourceCode":"\n    internal static async Task<string> ResolveContainerImageReferenceForDiskImageAsync(\n        IContainerRuntime runtime,\n        string imageReference,\n        CancellationToken cancellationToken)\n    {\n        ArgumentNullException.ThrowIfNull(runtime);\n        ArgumentException.ThrowIfNullOrWhiteSpace(imageReference);\n\n        var result = await runtime.InspectImageManifestAsync(imageReference, cancellationToken).ConfigureAwait(false);\n        if (result.Status == ContainerImageInspectionStatus.Unsupported)\n        {\n            throw new NotSupportedException(\n                $\"Container runtime '{runtime.Name}' does not support image manifest inspection, which is required for Azure sandbox deployment.\");\n        }\n\n        if (result.Status == ContainerImageInspectionStatus.Failed)\n        {\n            throw new InvalidOperationException(\n                result.ErrorMessage ?? $\"Container runtime failed to inspect image manifest '{imageReference}'.\");\n        }\n\n        if (!result.TryGetManifest(\"linux\", \"amd64\", out var manifest))\n        {\n            throw new InvalidOperationException(\n                $\"Container image '{imageReference}' does not contain a linux/amd64 manifest with an immutable digest.\");\n        }\n\n        return CreateDigestImageReference(imageReference, manifest.Digest);\n    }\n\n    private static string CreateDigestImageReference(string imageReference, string digest)\n    {\n        var digestSeparator = imageReference.IndexOf('@');\n        if (digestSeparator >= 0)\n        {\n            return $\"{imageReference[..digestSeparator]}@{digest}\";","sourceCodeStart":999,"sourceCodeEnd":1035,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Azure.Sandboxes/AzureSandboxContainerDeployment.cs#L999-L1035","documentation":"When the runtime's manifest inspection returns Status == Failed, the integration throws InvalidOperationException surfacing the runtime's own error message if present, otherwise this generic message. It means the inspection command ran but exited with an error (as opposed to being unsupported).","triggerScenarios":"InspectImageManifestAsync fails for the resolved image reference — e.g. the image is not present locally and cannot be pulled, the registry rejected the request (auth, rate limits), or the tag does not exist. The result's ErrorMessage, when set, becomes the thrown message.","commonSituations":"Typo in image tag so the pull/inspect fails; unauthenticated private registry (docker login missing); registry rate limiting; offline machine without a cached image; proxy/firewall blocking registry access.","solutions":["Read the surfaced runtime ErrorMessage (or run `docker manifest inspect <image>` manually) to see the underlying cause.","Run docker login / podman login against the registry and retry.","Verify the image tag/digest exists in the registry and pre-pull it locally (docker pull <image>) before deploying.","Check network/proxy configuration and registry availability, then re-run the deployment."],"exampleFix":"// before (shell)\naspire deploy   # fails: manifest inspect of myapp:latezt -> manifest unknown\n\n// after\ndocker pull myregistry.azurecr.io/myapp:latest   # fix tag, authenticate\naspire deploy","handlingStrategy":"try-catch","validationCode":"// Pre-flight: ensure the image is pullable\nvar proc = await Process.RunAsync(\"docker\", \"pull <image>\");\nif (proc.ExitCode != 0) throw new InvalidOperationException($\"Cannot pull image: {proc.Output}\");","typeGuard":null,"tryCatchPattern":"try\n{\n    await DeployToSandboxAsync(...);\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"failed to inspect image manifest\"))\n{\n    logger.LogError(ex, \"Manifest inspection failed; check registry auth and image tag.\");\n    throw;\n}","preventionTips":["Authenticate to the registry before deploying (docker login).","Pre-pull images so inspection runs locally.","Validate tags exist in the registry before deployment."],"tags":["containers","docker","registry","image"],"backgroundTag":"command-not-found","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"}