Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running windows-container (linuxversion works) #1

Open
peterwidmer opened this issue Nov 10, 2022 · 1 comment
Open

Problem running windows-container (linuxversion works) #1

peterwidmer opened this issue Nov 10, 2022 · 1 comment

Comments

@peterwidmer
Copy link

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?

@lippertmarkus
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants