This is the home of the RISC-V Development Container project. The goal of this project is to provide a single container that has all the tools you need to develop for most of the RISC-V technical products, as well as for cross-compiling to RISC-V target devices.
Why and how we built this #
There are a lot of tools used for working in the RISC-V ecosystem, and they have a lot of dependencies. The idea is to have a single container that contains the various tools and a way to manage their dependencies. To this effect, we utilize the .tool-versions
(via asdf-vm and mise) and direnv. Unfortunately, asdf/mise doesn’t support having different versions of GCC/LLVM compiler tool chains so there will be different major releases of the container to support those.
The container is a OCI based image, built with buildah, and designed to operate rootless. This means it will work with Docker and Podman (as well as their Desktop counterparts). The container is stored on Quay so that it can be obtained without requiring any account or to accept any terms of service.
The container doesn’t expose any services, and is designed to be used without network connectivity after it’s downloaded. It’s completely self contained, and is built for multiple architectures. Currently we build the container based on a Fedora base image, this is mostly done to support root-less functionality (Debian based containers can’t be used without root privileges as of the time of writing), but a RHEL UBI could be used if there is user requests. Because it’s designed to be self-contained, it can be run from any operating system and is specifically designed to run on Windows, MacOS, and RHEL/Rocky/AlmaLinux.
How to use the container #
The best way to engage the container is to mount a local directory from your workstation to the /work
path of the container. You can then use either the bash
or zsh
shell inside the container to build/test software.
As an example using podman:
podman run -ti -v $(pwd):/work quay.io/edolnx/riscv_dev:latest /bin/bash -i
would mount the current working directory and invoke the bash
shell.
As an example using docker:
docker run -ti -v $(pwd):/work quay.io/edolnx/riscv_dev:latest /usr/bin/zsh -i
would mount the current working directory and invoke the zsh
shell.
On MacOS, the security system prevents using relative paths inside your home directory as a mount location. Instead you must use the fully qualified path and it works as expected.
Contributing #
This project is licensed using the MIT license and it’s code is on GitHub. Contributions are accepted via a GitHub pull request or issue. If you cannot use GitHub, you are welcome to email Carl directly and he can proxy those issues/requests (optionally this can be done anonymously). We feel strongly that about building a community here, and encourage contributions. If there are features our use cases you need, we would like to hear them and will give them do consideration.