Memory dump with Nano server and Docker
02/04/2018
In this post I will detail the steps to create a memory dump for an application which runs in a docker container on Windows Nano server.
Here, I would like to thank @gaborpro for his suggestions throughout the process.
Let's assume we have a .net core application being developed, the application will run in a container based on an image with Windows Nano. At some point we will need to create a memory dump of our application to investigate performance issues. To get started a tool (an exe) needs to be available in the container for creating the dump file. There are several ways to achieve this:
Include the tool along with the application (COPY it in the dockerfile)
Extend the base image
Use docker cp command to copy it (if the command is supported on your platform)
Map an external drive (as a volume) with the tool available on the drive