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

Do not require Docker for root filesystem construction #71

Open
3 tasks
Tracked by #70
endersonmaia opened this issue Sep 4, 2024 · 0 comments
Open
3 tasks
Tracked by #70

Do not require Docker for root filesystem construction #71

endersonmaia opened this issue Sep 4, 2024 · 0 comments

Comments

@endersonmaia
Copy link
Contributor

endersonmaia commented Sep 4, 2024

📚 Context

The CLI build command uses Docker to build the root filesystem of the user application, by following the steps below:

  1. application defines a Dockerfile that builds as the final image of a multi-stage build a RISC-V runtime image containing the application code and whatever it need to work. Docker RISC-V support through QEMU emulation helps a lot because it avoids having to deal with cross-compilation to RISC-V, which is very convenient.

  2. a docker is created using docker container create and exported using docker container export, which create a .tar file with the filesystem contents.

  3. tar is then used to "cleanup" the .tar created by Docker, and remove files which may lead to irreproducibility.

  4. A .ext2 drive is created from the .tar file

  5. A Cartesi machine is created using the .ext2 file and other files like the Linux kernel. Machine is booted until it yields for the first time, then saved to a snapshot.

✔️ Solution

There will be more alternatives to build the application root filesystem after the VirtIO support is released.

Users will be able to interactively use the Cartesi machine, including network connectivity and host file system access, for prototyping and also for building the resulting root filesystem.

We need to start exploring these alternatives after that is available.

📈 Subtasks

  • explore how VirtIO works and how it can be leveraged for this task
  • adapt CLI to the new emulator version

🎯 Definition of Done

  • build a root filesystem without using Docker

Issue copied from sunodo/sunodo#366

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

No branches or pull requests

1 participant