Skip to content
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

Provide a common-runtime with machine-emulator-tools and use plain Dockerfile as template #23

Open
4 tasks
endersonmaia opened this issue May 8, 2024 · 1 comment
Labels

Comments

@endersonmaia
Copy link
Contributor

📚 Context

There's this idea of abstracting away the need to install the machine-emulator-tools and require the application developer to define some variables or wrap a call to the application execution with rollup-init.

This could all be done in the background, and application developers should only care about building a container that can run their applications, like they already do on other cloud runtime environments.

That's a responsibility of the runtime to adapt that container image to run on its environment.

✔️ Solution

sunodo build should prepare a common-runtime container image, with the right machine-emulator-tools installed and proper cartesi-init so that the application developer can provide only the Dockerfile for their application.

sunodo build would then create a rootfs for the application and inject it into the common-runtime rootfs and use crun to start the process ENTRYPOINT + CMD.

📈 Subtasks

  • Create a package to hold the container image code for this common-runtime and publish to public registries;
  • Add a flag to sunodo build to use the common-runtime strategy
  • ...

🎯 Definition of Done

  • It's possible to use all sunodo-templates without installing emulator-tools nor defining ROLLUPS_HTTP variables;
@endersonmaia
Copy link
Contributor Author

Just reporting my findings during a couple days of evaluating options to create this minimal runtime.

  • wolfi-os (melange, apko) is a great option but lacks upstream riscv64 builds
  • nixpks is a little more difficult to learn and also lacks upstream riscv64 builds
  • buildpacks lacks upstream riscv64 builds
  • Canonical's chisel is good and we can use riscv64/ubuntu builds

If we were going to build our own minimal image without having to bootstrap the riscv64 build, I'd go with Docker Hub riscv64/ubuntu:22.04 and use chisel + copy some libs.

Contribution upstream would be creating the chisel slices for the components we need.

So, that's where I'm heading.


We have Ubuntu 24.04 as the next LTS release, but we don't have riscv64/ubuntu images for that yet.

Links to keep track:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant