konet
konet copied to clipboard
Problem running windows-container (linuxversion works)
Hi Markus,
first of all, thank you for the tool. Great thing! I was able to build a containers and push it to the docker-hub. When trying to run them, the linux-version works perfectly, however the windows/amd64:ltsc2022 does not.
Build
konet build C:\Projects\myconsoleapp -t peterwidmer/test-console:1.0 -p windows/amd64:ltsc2022,linux/amd64
The error
In Windows I run it as follows: ctr.exe run --rm docker.io/peterwidmer/test-console:1.0-windows-amd64-ltsc2022 v1
And get the error: ctr: hcs::System::CreateProcess: myconsoleapp.exe v1: The system cannot find the file specified.: unknown
This works
Running only a command as follows to echo someting works, so I assume the container does not find myconsoleapp.exe
ctr.exe run --rm docker.io/peterwidmer/test-console:1.0-windows-amd64-ltsc2022 windows-test cmd /c "echo Hello World!"
Interesting
When I mount the image as follows:
ctr images mount docker.io/peterwidmer/test-console:1.0-windows-amd64-ltsc2022 c:\windowsimage
then I can find the myconsoleapp.exe in C:\windowsimage\Files
So it seems as if for Windows only the server-baseimage-layer gets loaded but not the one with myconsoleapp.exe Do you have any idea how I could get the windows-container working?
Hi Peter, I just tried to replicate your issue but it works for me:
dotnet new console -n myconsoleapp
cd .\myconsoleapp\
konet build -t lippertmarkus/test-console:1.0 -p windows/amd64:ltsc2022,linux/amd64
docker run --rm lippertmarkus/test-console:1.0-windows-amd64-ltsc2022
#Unable to find image 'lippertmarkus/test-console:1.0-windows-amd64-ltsc2022' locally
#1.0-windows-amd64-ltsc2022: Pulling from lippertmarkus/test-console
#Digest: sha256:2f30c5ee84f74d2a1cd294e48d87f05a648529614527c899e30c06fd2622da47
#Status: Downloaded newer image for lippertmarkus/test-console:1.0-windows-amd64-ltsc2022
#Hello, World!