GoogleContainerTools / distroless

🥑 Language focused docker images, minus the operating system.
Apache License 2.0
19.06k stars 1.17k forks source link

feat: support riscv64 #1269

Open ernado opened 1 year ago

ernado commented 1 year ago

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

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 commented 1 year ago

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.