Docker Containers on RISC-V Architecture

Me presenting at the Systems Summit in Switzerland

Risc-V Virtual Machine

To start with development, I provide a Risc-V Virtual Machine based on Debian Sid with a complete enviroment where you can start developing and building your applications on the Risc-V architecture.

Install Golang

Go support on Risc-V architecture is not upstream yet. You can check the progress on this issue. Many of it’s modules have already been upstreamed like x/sys and x/net. Also many libraries and applications already support the Risc-V architecture like VNDR, GitHub’s Hub (git client), Labstack Echo framework and more. Check the tracker on https://github.com/carlosedp/riscv-bringup.

# Download the tarball into the VM
wget https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/go-1.13-riscv64.tar.gz
# In the VM, unpack (in root dir for example)
tar vxf go-1.13-riscv64.tar.gz -C /usr/local
# Add to your PATH
export PATH="/usr/local/go/bin:$PATH"
# Add to bashrc
echo "export PATH=/usr/local/go/bin:$PATH" >> ~/.bashrc
Test the hello code from https://golang.org/

Install Docker

After starting your VM, download and install the Docker deb with:

wget https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/docker-19.03.5-dev_riscv64.debsudo apt install ./docker-19.03.5-dev_riscv64.deb

Running Containers

As a test, I already pushed a container to DockerHub with a hello-world web application using Echo Framework.

Building Containers

To build a container, just follow the default path of building your app, creating your Dockerfile and running docker buildlike the example from the repo. Checkout that tree and use the Makefile for convenience:

Build instructions

For more details on building packages from source, check the tracker repo on https://github.com/carlosedp/riscv-bringup where I have instructions for Docker, Podman, Golang and more.

Conclusion

Container use on Risc-V architecture is pretty functional. Now the heavy work is to upstream Go, implement CGO support and have base images to build software.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Carlos Eduardo

Carlos Eduardo

Writing everything cloud and all the tech behind it. If you like my projects and would like to support me, check my Patreon on https://www.patreon.com/carlosedp