When I use Azure Portal GUI to create new Container Instance with ubuntu:latest image, default properties and starting command [ "/bin/bash", "-c", "echo hello" ], everything works fine. Container will start, print 'hello' and shuts down. I can then see the message in the logs and I can also read this message using az container logs command.
When I attempt to do the same with Windows container, using nanoserver:sac2016 (officially listed as supported: https://docs.microsoft.com/en-us/azure/container-instances/container-instances-faq#windows-server-2016-base-images) and starting command [ "cmd", "/c", "echo hello" ], it runs with success, but there are no logs to be found and az container logs also prints nothing.
If I try to locally perform docker run, it behaves as expected, even if redirection of stdout is performed:
> docker run mcr.microsoft.com/windows/nanoserver:sac2016 cmd /c echo hello >log.txt
> type log.txt
hello
Is there some extra configuration that has to be performed for Windows images in order for them to correctly produce logs?
NOTE: This question is minimum reproducible for the issue, I have the same problem when I create the container instance by some other mean like C# code.