docker icon indicating copy to clipboard operation
docker copied to clipboard

RISC-V support

Open MarekPikula opened this issue 7 months ago • 6 comments

Hi, I use Docker-in-Docker image to build Docker images in GitLab CI. With the soon introduction of RISC-V native runners (with Cloud-V: https://cloud-v.co/gitlab-riscv-runner) I would like to build the RISC-V images on the native hardware but there seems to be no official variant for linux/riscv64 platform in the latest tag.

What would need to happen to introduce an official RISC-V support for DinD image? Alpine already has official base image builds, so it should be no problem to enable the platform in the build matrix, right?

MarekPikula avatar Jul 09 '25 17:07 MarekPikula

We get our builds of Docker from https://download.docker.com/linux/static/stable/, which unfortunately doesn't currently include riscv64.

tianon avatar Jul 09 '25 21:07 tianon

Thank you for pointing me there. Are you aware of any efforts in bringing official RISC-V support upstream?

MarekPikula avatar Jul 10 '25 08:07 MarekPikula

If you're interested in an alternative, I've built unofficial images at harbor.nirvati.org/library/docker:28-cli and harbor.nirvati.org/library/docker:28-dind.

https://gitlab.com/nirvati/risc-v/utils/docker-risc-v-builds https://gitlab.com/nirvati/risc-v/utils/docker

It's a slightly patched of dockerd and docker-cli, so it's not official.

AaronDewes avatar Jul 10 '25 11:07 AaronDewes

Thanks for the pointer @AaronDewes. Are you planning to upstream your work any time soon? To be honest, I would prefer to stick to the official images.

MarekPikula avatar Jul 10 '25 12:07 MarekPikula

I can't really upstream most of it because I'm mostly just recompiling dockerd. I have two patches for rootlesskit, I can have a look at the possibility of upstreaming these, but the main issue is Docker not having official builds.

In essence, I forked the older version of mirage-entropy vpnkit uses and added this patch: https://gitlab.com/nirvati/risc-v/mirage-entropy/-/commit/78f90076fa2d73efa47b06290e39656915b07090

But because it's an outdated/unmaintained version, I can't submit it directly as-is.

AaronDewes avatar Jul 10 '25 12:07 AaronDewes

I think https://github.com/moby/moby/issues/44319#issuecomment-1690437603 and/or https://github.com/docker/docker-ce-packaging/pull/1072 are the closest things I can find to an "upstream" tracker for riscv64 builds on download.docker.com.

tianon avatar Jul 14 '25 20:07 tianon