Support running on windows
Does umoci support running on windows? Specifically the unpack to directory operation? For any type of container.
If not; could this be a feature request?
Thanks!
No it's not supported, we only guarantee full support for Linux and limited support for macOS / BSD (it probably works okay but we don't exhaustively test it in CI so I don't feel comfortable saying it is supported). umoci doesn't even compile for Windows.
For Windows, there are two issues that I see with us adding support for it:
-
I don't use Windows, and haven't done any programming on Windows for a long time.
-
Fundamentally, umoci primarily deals with packing and unpacking tar archives. Most of the tar archive format used by OCI is very strongly unix-based and my understanding is that Windows filesystems do not support many filesystem objects that you would find in a typical container image:
- Symlinks on Windows are quite strange and require privileges to create, in addition to not working like symlinks on Unix systems.
- Extended attributes are completely unsupported AFAIK.
- File permissions (especially setuid/setgid) do not map to Windows at all.
- I suspect that the timestamp handling of files in Windows is quite different to Unix, which is a pretty big deal since a key aspect of reproducible image builds is being able to match timestamps from tar archives.
I also do not see how we would implement
umoci repackon Windows -- even if we could unpack to something fairly reasonable, it seems incredibly unlikely that we would be able to produce a reasonable diff layer by attempting to convert from the Windows world back to tar archives. It would feel quite strange to only supportumoci unpack.One other very important aspect of umoci is that we try very hard to make sure that our outputs match the source tar archive as close as possible (something that most tools do not do properly) -- but on Windows we would struggle to support this because we would need to silently remap lots of things we extract to make them work on Windows.
My understanding is that almost all container runtimes that run on Windows are actually running Linux under the hood and thus are never extracting container images onto Windows filesystems -- almost certainly for the above reasons. Given this, I would be interested in knowing more about what you would like to accomplish by using umoci on Windows directly. (FWIW, umoci should work perfectly fine within WSL.)