From 5913d5f12790130a59a2d083ba7298fbd279c98e Mon Sep 17 00:00:00 2001 From: Bingxin Li Date: Sat, 15 Feb 2025 20:30:41 +0800 Subject: [PATCH 1/2] Dockerfile: Switch from debian to ubuntu Currently `debian:bookworm-slim` does not support `riscv64`, while `debian:trixie-slim` fails to build `libbpf`. Switching to `ubuntu:22.04` which is sufficient to build even for `riscv64. Signed-off-by: Bingxin Li --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70f1a61..6ec549b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ FROM --platform=amd64 calico/qemu-user-static:latest as qemu -FROM debian:bookworm-slim as bpftool-build +FROM ubuntu:22.04 as bpftool-build ARG SOURCE_REPO=https://github.com/libbpf/bpftool.git ARG SOURCE_REF=main From 39a5e16e4a7f4617601556eae19061cedbd086b4 Mon Sep 17 00:00:00 2001 From: Bingxin Li Date: Sat, 15 Feb 2025 20:34:02 +0800 Subject: [PATCH 2/2] riscv64: Introduce build for RISC-V Signed-off-by: Bingxin Li --- Makefile | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 10c64aa..9541318 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: image ############################################################################### # Input parameters. ############################################################################### -DOCKER_PLATFORMS ?= linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x +DOCKER_PLATFORMS ?= linux/amd64,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x VERSION ?= v7.5.0 IMAGE_ORG ?= calico IMAGE ?= $(IMAGE_ORG)/bpftool:$(VERSION) diff --git a/README.md b/README.md index 7931088..3f29dcb 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ make image-single-platform To build for specific platforms, use the `DOCKER_PLATFORMS` variable: ``` -make image DOCKER_PLATFORMS=linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x +make image DOCKER_PLATFORMS=linux/amd64,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x ``` To build/push the image: ``` make push -``` \ No newline at end of file +```