-
Notifications
You must be signed in to change notification settings - Fork 49
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
Figure out how to remove platform specific files from docker images #89
Comments
Discussed a bit at Runwasi office hours and offline with a few folks, A couple options we came up with (there might be more):
Prototyping the second solution using stream processors would be a good way to determine if it is feasible. |
So today we should be able to use stream processors, however it was suggested is to handle this at the "unpacker" level (via the transfer service) and essentially choose an unpacker passed on the image platform. So we could have a wasi/wasm unpacker and have different implementations of the unpacker when running on linux vs windows. This (transfer service) is not wired up to CRI today, but it is being discussed. |
Is there any docs/issue/pr on the transfer service or unpacker that I could look at? What would be the differences and pros/cons of using stream processor vs transfer service? |
I think the main thing is you can select an unpacker based on image platform and not have to do anything special with new types. Using a stream processor requires a new type, a backchannel to containerd to create the content in, and installing more binaries on a node. |
The stream processor approach didn't work out since (see prototype)
|
I have since done a few prototypes and have a proposal in review at https://docs.google.com/document/d/11shgC3l6gplBjWF1VJCWvN_9do51otscAm0hBDGSSAc |
Ideally, WASM images should be built to contain pretty much only the wasm module and maybe a configuration file for the runtime (i.e. slightfile.toml) and not much else. This would keep the OCI packages cross platform with out relying on multi-arch manifests improving the ability to use them everywhere, without modifications.
This might be tricky for a few reasons:
containerd-wasm-shims/images/slight/Dockerfile
Line 5 in a662b07
buildx
on Windows, then these files and a few other files get added to the image.There is a crate in runwasi that helps with the creation of images like this without the need for buildx: https://github.com/containerd/runwasi/tree/main/crates/oci-tar-builder
There will need to be some investigation on how to provide things like ssl certs and likely other components as well. The end goal would be to have purely "wasm" based images but that might not be practical, in those cases how do we deal with OS specific deps?
The text was updated successfully, but these errors were encountered: