sunodo / sunodo

Sunodo monorepo
https://docs.sunodo.io
Apache License 2.0
21 stars 14 forks source link

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

Closed endersonmaia closed 1 week ago

endersonmaia commented 1 month ago

πŸ“š 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

🎯 Definition of Done

endersonmaia commented 1 month ago

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

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:

endersonmaia commented 1 week ago

Moved to cartesi/cli#23