Which docker windows image do I need for running UWP app?

I have a console application that uses UWP (Windows.Media.*) and I’m trying to run it in a docker container, which base Windows image should I use?

What do I need to install on top of the base image in order to run the exe successfully? I tried adding VS tools and windows sdk in servercore but it didn’t work. I only need the runtime dependencies for the .exe, not build dependencies.

This is something that I don’t think many of us can help you with (not too much Windows containers experience). Finding the the required packages is always the first step of creating new Docker images and often a hard one.

On Linux, when a dependency is missing from the image, usually there is an error message when we start the container which tells us which library is required. Sometimes it is not the exact name of the library but a recognizable name which we can search for.

If you can show us some error message, it is possible that we can help you to find the missing dependency, but there is no guarantee.

You can try to use the Server image. Here is the name for a docker pull:
docker pull mcr.microsoft.com/windows/server

O did a blog post on which image to choose here: Nano Server x Server Core x Server - Which base image is the right one for you? - Microsoft Tech Community

1 Like