distroless icon indicating copy to clipboard operation
distroless copied to clipboard

feat: support riscv64

Open ernado opened this issue 2 years ago • 10 comments

riscv64 architecture support for static images

Add support for riscv64 architecture, so riscv64 support can be added for dependant projects that are building on distroless.

riscv64 should be limited to only the static images and dependencies. This will reduce impact on the build.

The static images support would be enough.

Current issues

..URL: https://snapshot.debian.org/archive/debian/20230314T211539Z/dists/bullseye/main/binary-riscv64/Packages.xz, Status: 404 NOT FOUND
panic: failed (status: 404) to fetch remote file: "https://snapshot.debian.org/archive/debian/20230314T211539Z/dists/bullseye/main/binary-riscv64/Packages.xz"

There are no packages snapshot for riscv64, so updateWorkspaceSnapshots.sh will fail.

Reference

  • https://wiki.debian.org/RISC-V (in-progress debian riscv64 port)
  • Debian-riscv mailing list message from me
  • https://github.com/carlosedp/riscv-bringup/ (attempt to bring riscv64 support to container infra from 2019 with lots of additional info)
  • https://github.com/etcd-io/etcd/pull/15490 (etcd PR where distroless image is required)
  • https://github.com/GoogleContainerTools/distroless/pull/1268 (my failed attempt to add riscv64 to distroless)

Upd

I've made a fork with CI/CD for building distroless riscv64 images on Debian Sid (unstable):

https://github.com/go-riscv/distroless

Looks like I will stick to it until Debian Trixie is released, where riscv64 will be (hopefully) stable, I think it will be in 2025.

ernado avatar Mar 17 '23 07:03 ernado

I've made another attempt to support riscv64, but it requires medium size non-trivial refactoring: https://github.com/GoogleContainerTools/distroless/pull/1270

I think it will never be merged, but it was interesting exercise and I've became familiar enough with bazel and distroless repo to create a functioning fork with CI/CD for image publishing.

ernado avatar Mar 18 '23 18:03 ernado