dockerc
dockerc copied to clipboard
Windows support
Is there a plan to support windows? About what time?
There is. I have not found time to work on it recently.
what?
@NilsIrl have you considered looking into @.jart's Cosmopolitan libc project, which allows for compiling a binary which functions across Linux and Windows platforms, as part of making this single-executable scheme work for Windows? https://github.com/jart/cosmopolitan
@jwoglom I have looked at Cosmopolitan libc. It would not be suitable for dockerc, at least not for the docker runtime. To make it work on windows would involve starting a small linux kernel and then run the conatiner inside of it.
Could it work with Windows docker images?
what needs to happen to do this? I am looking for mac and win support.
The main issue right now is that I don't want to have to allocate memory upfront for the VM so we'll need dynamic memory allocation. Unfortunately QEMU does not support this as far as I can tell and I haven't found anything that does.
It is possible, orbstack does it: https://orbstack.dev/blog/dynamic-memory
This is called memory ballooning.
Some links (for future reference, I have not looked at them in incredibly careful detail):
- https://www.reddit.com/r/linuxquestions/comments/i7zn7d/does_kvmqemu_support_releasing_unused_guest/
- https://pmhahn.github.io/virtio-balloon/
- https://www.qemu.org/docs/master/interop/virtio-balloon-stats.html
- https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/virtualization_administration_guide/section-libvirt-dom-xml-memory-baloon-device
- https://kvm-forum.qemu.org/2020/KVM%20Forum%202020%20Virtio-%28balloon%20pmem%20mem%29%20Managing%20Guest%20Memory.pdf
- https://github.com/firecracker-microvm/firecracker/blob/main/docs/ballooning.md
- https://news.ycombinator.com/item?id=33954348 (This comment claims the virtio balloon is intended for "near OOM conditions" so we should double check that it fits our use case)
- https://virtio-mem.gitlab.io/
Also contrary to what I was previously thinking we might want to use libvirt instead of QEMU. My understanding is that libvirt is a wrapper around QEMU (among others) and provides a better API.
Also it seems like it's at this layer that where we'll have the best control over memory allocation: https://libvirt.org/kbase/memorydevices.html
Is this feature in development in any branch?