flannel-io / flannel

flannel is a network fabric for containers, designed for Kubernetes
Apache License 2.0
8.61k stars 2.87k forks source link

Riscv64 failed to build images #1853

Open yzewei opened 5 months ago

yzewei commented 5 months ago

Riscv64 failed to build images When I read the source code, I found that Dockerfile's golang:alpine does not support build image in the riscv architecture

Possible Solution

Do you need to provide a separate DockerFile such as Dockerfile.riscv?

yzewei commented 5 months ago

@thomasferrandiz

thomasferrandiz commented 5 months ago

The latest release was built properly for riscv64: https://hub.docker.com/layers/flannel/flannel/v0.24.0-riscv64/images/sha256-0a2382f66d6b44d52c7bc7a74a054aef69fb777690240e56627934cb6cbc02d1?context=explore

golang:alpine itself does not support riscv64 at the moment but it is only used for cross-compilation. The final image is using alpine edge which does support riscv64: https://hub.docker.com/layers/library/alpine/20230901/images/sha256-d922baa09b54aa974583701763ae572672a56dc777b1f9b94a4c1336a0501413?context=explore

If you want to build the image locally, you will need to use docker buildx to use the new multi-arch Dockerfile.