containerd / go-runc

runc bindings for Go
Apache License 2.0
162 stars 73 forks source link

Need help to understand non-linux (Windows) branch in go-runc #94

Open ningziwen opened 1 year ago

ningziwen commented 1 year ago

Hi, I'm new to go-runc and trying to learn go-runc from reading the docs and source code.

I noticed there is code for non-linux (Windows) branch in multiple places.

https://github.com/containerd/go-runc/blob/main/command_other.go https://github.com/containerd/go-runc/blob/main/io_windows.go

I'm wondering what is the use case of having non-linux branch in go-runc. My understanding is go-runc is a wrapper for runc and runc is linux-specific. Windows container runtime has a separated repo hcsshim to be used by containerd. So why does go-runc need windows branch? Does go-runc/runc have the plan to support Windows container?

kzys commented 1 year ago

Seems it was for hcsshim.

cc @jterry75 because of https://github.com/containerd/go-runc/pull/45

jterry75 commented 1 year ago

Lolz its march and I have now seen this. Still need help?

jterry75 commented 1 year ago

Its just because the client is built into some generic containerd calls and so rather than forking all of those go files we just have it return unsupported for windows