File.ReadAllBytes execution hangs in Docker container

This is .Net framework 4.7.2 console app, build platform x64, build in release mode.

OS Windows 10, Docker desktop

When running in windows container, the program hangs at File.ReadAllBytes, while reading a 130 MB binary file. This file copied into assembly folder, also get copied into container. File.Exists verified the file is there.
The program runs fine to the end when running directly in command prompt, outside container.

Please help.


FROM microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-1803

ARG source


COPY ${source:-bin/Release} .

CMD [“fileread-docker.exe”]


    class Program
        static void Main(string[] args)
            var path = Path.Combine("folder", "");
            Console.WriteLine($"Read file from {path}");
            if (File.Exists(path))
                Console.WriteLine($"File exist at {path}");
                var file = File.ReadAllBytes(path);
                Console.WriteLine($"File has been read at {path}");
                Console.WriteLine($"File not exist at {path}");

Source: StackOverflow