-
Notifications
You must be signed in to change notification settings - Fork 136
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
Youki as runtime #295
Comments
That is really interesting I hadn't heard of that project. Initially not quite sure how or if an integration would work - e.g. can you use Youki as a library without Docker/Portman ? I'll need to look a little closer.. |
You can run youki as standalone app : https://containers.github.io/youki/user/basic_usage.html#using-youki-standalone It can create OCI container https://github.com/containers/youki/tree/main/crates/liboci-cli. You can also replace docker runtime (runc) , with youki. I think, the best way to integrate youki to bollard is to provide a cli to parse dockerfile and create image through youki with dockerfile. |
Parsing the Dockerfile is big enough to be a project on its own (e.g. buildkit)... I can imagine perhaps translating the API and struct definitions in Bollard into Youki configuration - although you are missing the rootfs file structure to actually run it. I guess the challenge is finding out what it takes to do that. |
We can get remote rootfs with container config Or create the busybox rootfs
|
Hello 👋, isn't youki (or any other alternative runtime) already supported through the use of the Something like use bollard::{container::Config, Docker, models::HostConfig};
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let docker = Docker::connect_with_socket_defaults().unwrap();
let config = Config {
image: Some("hashicorp/http-echo:latest"),
host_config: Some(HostConfig {
runtime: Some("youki".to_string()),
..Default::default()
}),
..Default::default()
};
let container_id = &docker.create_container::<&str, &str>(None, config).await?.id;
let _ = &docker.start_container::<String>(&container_id, None).await?;
Ok(())
} |
@ledoyen I think you're right, if you setup your docker daemon to use youki as a runtime. Perhaps though it might be more useful to be able to trigger youki directly from Bollard, as you will not need the Docker server at all. |
Yes, it would be awesome to avoid Docker and to get a native rust container engine, with cli support like buildkit |
It would be awesome if you could support Youki as container runtime
The text was updated successfully, but these errors were encountered: