-
Notifications
You must be signed in to change notification settings - Fork 617
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
Windows support #28
Comments
Contribution is wanted 😃 |
I took a quick look and it would be doable but would require some work, there are assumption that this would run on linux like (there are probably more): Line 229 in 06f3a7c
Lines 762 to 766 in 435f533
nerdctl/pkg/lockutil/lockutil.go Line 33 in 435f533
|
I got started on this. Will likely want to break this down into many different PRs |
Thanks! |
Got it to build and connect 🚀
Needs some more work to be able to run containers |
I was able to get
Although it is rough, I opened #164 just to show the work involved. I would propose breaking this down into at least two PRs for easier reviewing:
What do you think @AkihiroSuda? |
SGTM, thanks |
I am revisiting this ticket since Rancher Desktop 0.5 just added initial nerdctl support. My understanding is that the latest version of nerdctl doesn't support Windows containers, unless one builds a branch from @jsturtevant from source + installs containerd.exe manually? |
Yes. Help wanted to move #197 forward |
should we close this? I've opened a few other issues to track the next steps in windows support, otherwise this could be used as an epic? |
I think we can keep opening this |
I was wondering what the current status is for Windows support ? Based on below, can I assume this issue can be closed now? Was there anything in particular outstanding? |
https://github.com/containerd/nerdctl/issues?q=is%3Aissue+label%3Aplatform%2FWindows%2FNon-WSL2+is%3Aopen are the outstanding issues. (Same list as #28 (comment), but the label has been renamed since that comment was made.) I have no strong opinion on whether we should keep this issue open or not. This issue does appear to lack clear (unmet) success criteria though. |
We still need to support builds and compose AFAICS. |
#627 exists for building, it is currently blocked on microsoft/Windows-Containers#34 and through to buildkit and related. Once we have buildkitd for WCOW stable, hopefully the integration won't be too far from how it's used on non-Windows. I know approximately nothing about compose, nor the compose support in nerdctl. I don't yet see a ticket for it to work on Windows, so I'm guessing not much time has been spent on that yet, given we're still lacking build support. Are you thinking of a simple installer for nerdctl.exe, or more like the "Full" binary release, bundling the whole (Windows-supported) stack of dependencies with service setup etc? Or perhaps something different? We could recreate something like MS's existing containerd/nerdctl script, perhaps. |
I’m expecting the latter one |
I can help with the installer and porting Go code cross-platforms. FYI: That linked issue just got an update 9 hours ago:
|
At this point, the hardest remaining thing for "Windows support" is getting compose working, and I say that simply because I have no context on compose, so don't know how far the current code is from "working" if we simply remove any checks for Windows. That said, building a full-stack installer (containerd, nerdctl, buildkitd, CNI plugins, is there a composed?) is a fiddly task, so having that done even before we have compose support ready would definitely make it easier for people to test and start working with the nerdctl stack. And really, that's more important than closing any specific ticket, I think. Oh, we need to look closely at the CNI setup, nerdctl generates CNI 1.0.0 configs, but the last-released WinCNI nat plugin can't read those. The WinCNI source has been updated, but no new releases shipped. So we might need to bundle a local build of the WinCNI plugin in such a package. (Also, the generated config might be slightly wrong. I worked through this while testing nerdctl/buildkitd support on Windows, see microsoft/Windows-Containers#34 (comment) for example. However, I was working from an existing Docker-created NAT network, so that's not necessarily the complete target experience.) |
On the topic of installers, I just came across https://github.com/microsoft/containers-toolkit which appears to be the start of centralising various containerd-nerdctl-buildkitd stack install scripts in a PowerShell module. I haven't tried it, but it might be a reasonable alternative or placeholder for the full setup.exe install stack we've talked about here. |
Hmmm, maybe it's time to extend Stevedore a bit 😈 |
How do you handle the situation with nerdctl requesting CNIVersion=1.0.0 in UPD: I missed that @TBBle talks about it in #28 (comment). Maybe we actually should just fork and release the thing while waiting for upstream. |
Look what I've got for you! |
See containerd/nerdctl#28 (comment) We're waiting for a release that contains changes from microsoft/windows-container-networking#101
And... done! |
@slonopotamus Great to see! PS: Ping me if you need/want a hand |
A quick note while I think of it: If I remember correctly, Windows only allows one NAT network to be created. So we might want to look at being able to read an existing NAT network config back from HCN/HNS when generating the CNI config, rather than just stamping out a pre-determined config as I recall we do now. That will make life easier for systems where Docker is also installed, particularly if the user wants Docker to continue to work. Alternatively, matching whatever Docker's defaults are for the NAT network might bridge that gap for the majority of cases; assuming they're not dynamic... and assuming we're not already doing that and my experience wasn't an outlier. |
Well... Things are not fully functional. nerdctl container gets default gateway from
Interestingly, neither nerdctl- nor docker-based container can access IPv6 address. UPD: Okay, I can force nerdctl to create a separate NAT network by adjusting Can anyone explain what's the purpose of |
I must have misremembered about the NAT network limitation then, sorry. I'm sure there was some limitation, but maybe it was in Docker or something? (It may have been in the older virtual network API, too.)
This is a known behaviour issue to be fixed in the WinCNI plugins: If you name an existing network, it uses it as-is, it does not update it to match the CNI configuration. (The default gateway lives on the net connection to the network, not the network itself). See microsoft/windows-container-networking#98 There's also an issue around the WinCNI plugins faultily matching their network binary to their type rather than their name, when they are creating a network: microsoft/windows-container-networking#57 It's possible this is why I recalled multiple NAT networks being a problem... |
I believe that issue is outdated. I was able to use a different network name in I'm not sure it is a good idea. It will break things. I'd solve the issue from a completely different angle. If a network is already created, why user needs to write config file at all? Just inspect network and use settings from it. |
BTW, there is a new release of win-cni: https://github.com/microsoft/windows-container-networking/releases/tag/v0.3.1 |
Hey folks. Is this issue still serving a purpose? |
Last time we talked about this:
Since then, we have build support (i.e. BuildKit), but not yet Compose (in fact, I don't even see a ticket for it) and I'm not a Compose user, so I haven't looked into it to see what exactly that entails. The Compose implementation is already included in the Windows binary, so maybe it "just works"? I'm really hoping someone who uses Compose on Windows Containers will magically appear and report bugs in what we have now, and or tell us it works fine... We don't have a full-stack installer in the containerd org yet, but Stevedore can cover that at the moment; it isn't mentioned in the README's component list, but it does include BuildKit, so it should cover all the use-cases we have for a full-stack installer AFAIK. |
I am looking for a way to use containerd on Windows Server 2019 with a Docker CLI replacement like this one. I see there are Linux builds, but has a Windows port been attempted?
Long story short, containerd for Windows should handle graceful shutdowns for containers, but the current version of Docker is still using HCS v1 + some really broken stuff under the hood, meaning Windows containers have never supported graceful shutdowns (microsoft/Windows-Containers#16).
There is no clear migration path for Docker to adopt containerd on Windows in the short term, so I would be fine with installing containerd on Windows (https://kubernetes.io/docs/setup/production-environment/container-runtimes/#install-containerd) but then I just need a proper CLI on top of it, other than 'ctr' which is very primitive and marked as unsupported/unstable.
I am not familiar with Go, but how difficult would it be to attempt a Windows port of this tool?
The text was updated successfully, but these errors were encountered: