The side car approach for setting up Dotnet Monitor in a Windows Container to get the diagnostics logs of a different container is currently not supported as mentioned by Jander-MSFT in this Github Issue which might get resolved by this Issue.

As a Solution , You will have to install the tool on the same Windows container by running the below command :

dotnet tool install --global dotnet-monitor --version 6.0.0

You can refer this blog by Scott Hanselman for more details on the same .

Answer from Ansuman Bal on Stack Overflow
🌐
Docker Hub
hub.docker.com › r › microsoft › dotnet-monitor
microsoft/dotnet-monitor - Docker Image
This tool is an ASP.NET application that hosts a web API for inspecting .NET processes and collecting diagnostic artifacts. This image also contains .NET Monitor extensions for egressing artifacts to Azure Blob Storage and Amazon S3. Watch discussions⁠ for Docker-related .NET announcements.
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › core › diagnostics › dotnet-monitor
dotnet-monitor diagnostic tool - .NET | Microsoft Learn
dotnet tool install --global dotnet-monitor · Docker image: Download a Docker image for use in multi-container environments: docker pull mcr.microsoft.com/dotnet/monitor ·
🌐
GitHub
github.com › dotnet › dotnet-monitor › blob › main › documentation › docker.md
dotnet-monitor/documentation/docker.md at main · dotnet/dotnet-monitor
This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints - dotnet-monitor/documentation/docker.md at main · dotnet/dotnet-monitor
Author   dotnet
🌐
GitHub
github.com › dotnet › dotnet-monitor › blob › main › documentation › kubernetes.md
dotnet-monitor/documentation/kubernetes.md at main · dotnet/dotnet-monitor
In addition to its availability as a .NET CLI tool, the dotnet monitor tool is available as a prebuilt Docker image that can be run in container runtimes and orchestrators, such as Kubernetes.
Author   dotnet
🌐
GitHub
raw.githubusercontent.com › dotnet › dotnet-docker › nightly › README.monitor.md
.NET Monitor Tool
dotnet/nightly/monitor/base: .NET Monitor Base (Preview) dotnet/nightly/aspire-dashboard: Aspire Dashboard (Preview) dotnet/nightly/yarp: YARP (Yet Another Reverse Proxy) (Preview) dotnet/samples: .NET Samples · .NET Framework: dotnet/framework: .NET Framework, ASP.NET and WCF · dotnet/framework/samples: .NET Framework, ASP.NET and WCF Samples · Tags | Dockerfile | OS Version ---- | ---------- | ---------- 10.0.2-preview.1, 10.0, 10, latest | Dockerfile | Azure Linux 3.0 9.0.5, 9.0, 9 | Dockerfile | Azure Linux 3.0 8.1.3-ubuntu-chiseled, 8.1-ubuntu-chiseled, 8-ubuntu-chiseled, 8.1.3, 8.1, 8 | Dockerfile | Ubuntu 22.04 8.1.3-azurelinux-distroless, 8.1-azurelinux-distroless, 8-azurelinux-distroless | Dockerfile | Azure Linux 3.0 ·
🌐
Microsoft
devblogs.microsoft.com › dev blogs › .net blog › introducing dotnet-monitor, an experimental tool
Introducing dotnet-monitor, an experimental tool - .NET Blog
May 20, 2021 - Once you have the image pulled locally, you will need to share a volume mount between your application container and dotnet-monitor using the following commands: docker volume create diagnosticserver docker run -d --rm -p 8000:80 -v diagnosticsserver:/tmp mcr.microsoft.com/dotnet/core/samples:aspnetapp docker run -it --rm -p 52323:52323 -v diagnosticsserver:/tmp mcr.microsoft.com/dotnet/nightly/monitor:5.0.0-preview.1 --urls http://*:52323
🌐
GitHub
raw.githubusercontent.com › dotnet › dotnet-docker › main › README.monitor.md
.NET Monitor Tool Featured Tags `10` (Long-Term Support)
dotnet/nightly/monitor: .NET Monitor Tool (Preview) dotnet/samples: .NET Samples · .NET Framework: dotnet/framework: .NET Framework, ASP.NET and WCF · dotnet/framework/samples: .NET Framework, ASP.NET and WCF Samples · Tags | Dockerfile | OS Version ---- | ---------- | ---------- 10.0.2, 10.0, 10, latest | Dockerfile | Azure Linux 3.0 9.0.5, 9.0, 9 | Dockerfile | Azure Linux 3.0 8.1.3-ubuntu-chiseled, 8.1-ubuntu-chiseled, 8-ubuntu-chiseled, 8.1.3, 8.1, 8 | Dockerfile | Ubuntu 22.04 8.1.3-azurelinux-distroless, 8.1-azurelinux-distroless, 8-azurelinux-distroless | Dockerfile | Azure Linux 3.0 ·
Find elsewhere
🌐
GitHub
github.com › dotnet › dotnet-monitor › blob › main › documentation › setup.md
dotnet-monitor/documentation/setup.md at main · dotnet/dotnet-monitor
The LKG build of dotnet monitor is also available as a container image. You can pull the image using the following command: docker pull mcr.microsoft.com/dotnet/nightly/monitor
Author   dotnet
🌐
GitHub
github.com › dotnet › dotnet-docker › blob › main › README.monitor.md
dotnet-docker/README.monitor.md at main · dotnet/dotnet-docker
This tool is an ASP.NET application that hosts a web API for inspecting .NET processes and collecting diagnostic artifacts. This image also contains .NET Monitor extensions for egressing artifacts to Azure Blob Storage and Amazon S3. Watch discussions for Docker-related .NET announcements.
Author   dotnet
🌐
GitHub
github.com › dotnet › dotnet-monitor › blob › main › documentation › docker-compose.md
dotnet-monitor/documentation/docker-compose.md at main · dotnet/dotnet-monitor
This repository contains the source code for .NET Monitor - a tool that allows you to gather diagnostic data from running applications using HTTP endpoints - dotnet-monitor/documentation/docker-compose.md at main · dotnet/dotnet-monitor
Author   dotnet
🌐
Docker Hub
hub.docker.com › r › microsoft › dotnet-monitor-base
microsoft/dotnet-monitor-base - Docker Image
This image contains the base installation of .NET Monitor, a diagnostic tool for capturing diagnostic artifacts (such as dumps and traces) in an operator-driven or automated manner.
🌐
Docker Hub
hub.docker.com › r › microsoft › dotnet-nightly-monitor
microsoft/dotnet-nightly-monitor - Docker Image
See dotnet⁠ for images with official releases of .NET⁠. ... This image contains .NET Monitor, a diagnostic tool for capturing diagnostic artifacts (such as dumps and traces) in an operator-driven or automated manner. This tool is an ASP.NET application that hosts a web API for inspecting ...
🌐
Docker Hub
hub.docker.com › r › microsoft › dotnet-nightly-monitor-base
microsoft/dotnet-nightly-monitor-base - Docker Image
See dotnet⁠ for images with official releases of .NET⁠. ... This image contains the base installation of .NET Monitor, a diagnostic tool for capturing diagnostic artifacts (such as dumps and traces) in an operator-driven or automated manner.
🌐
GitHub
github.com › dotnet › dotnet-docker › blob › nightly › README.monitor.md
dotnet-docker/README.monitor.md at nightly · dotnet/dotnet-docker
dotnet/nightly/monitor/base: .NET Monitor Base (Preview) dotnet/nightly/aspire-dashboard: Aspire Dashboard (Preview) dotnet/nightly/yarp: YARP (Yet Another Reverse Proxy) (Preview) dotnet/samples: .NET Samples · .NET Framework: dotnet/framework: .NET Framework, ASP.NET and WCF · dotnet/framework/samples: .NET Framework, ASP.NET and WCF Samples · Tags · Dockerfile ·
Author   dotnet
🌐
Scott Hanselman's Blog
hanselman.com › blog › exploring-your-net-applications-with-dotnetmonitor
Exploring your .NET applications with dotnet-monitor - Scott Hanselman's Blog
September 24, 2020 - If you're in k8s (Kubernetes) you should run dotnet monitor as a sidecar to your container within the same pod.
🌐
GitHub
github.com › dotnet › dotnet-docker › blob › main › README.monitor-base.md
dotnet-docker/README.monitor-base.md at main · dotnet/dotnet-docker
This image contains the base installation of .NET Monitor, a diagnostic tool for capturing diagnostic artifacts (such as dumps and traces) in an operator-driven or automated manner.
Author   dotnet
🌐
Dotnetos
dotnetos.org › blog › 2021-11-22-dotnet-monitor-grafana
Configuring dotnet-monitor with Prometheus and Grafana - Dotnetos - courses & conferences about .NET
November 22, 2021 - We can install dotnet-monitor as a global tool, but let’s stay with containers. There is up and ready container image available on Microsoft Container Registry so it is as easy as the following command: ❯ docker run -it --rm -p 52323:52323 --mount "source=dotnet-tmp,target=/tmp" \ mcr.microsoft.com/dotnet/monitor --urls http://*:52323 --no-auth
🌐
Microsoft Learn
learn.microsoft.com › en-us › shows › on-dotnet › diagnosing-net-6-issues-from-sidecar-containers-using-dotnet-monitor
Diagnosing .NET 6 issues from sidecar containers using dotnet-monitor | Microsoft Learn
Mike Rousos continues his series on how to use .NET CLI tools to diagnose common performance and reliability issues by showing how dotnet-monitor can be used to easily diagnose issues in Kubernetes clusters from sidecar containers. Chapters 00:00 - 00:00 - .NET diagnostic tools & dotnet-monitor 03:20 - What is a sidecar container?
🌐
Medium
medium.com › @davidsilwal › diagnosing-net-aaf5b6821486
Diagnosing .NET Applications in Docker with dotnet-dump, dotnet-counters, dotnet-gcdump, and dotnet-trace | by David Silwal | Medium
February 19, 2025 - Diagnosing .NET applications running in Docker containers can be complex, but tools like dotnet-dump, dotnet-counters, and dotnet-trace significantly simplify the process. By incorporating these tools into your Dockerfile, you can efficiently collect crash dumps, monitor performance metrics, and capture execution traces, enabling you to identify and resolve runtime issues with greater ease.