docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.33k stars 448 forks source link

Add amd64/v3 builder for apple silicon #2566

Open klnusbaum opened 2 days ago

klnusbaum commented 2 days ago

Description

Currently, if I try to build a container image on apple silicon using the amd64/v3 builder, I get the following error:

ERROR: failed to solve: no support for running processes with linux/amd64/v3 platform, supported: linux/amd64, linux/amd64/v2

I'd like to be able to build using amd64/v3, but looking at the available builders, it appears only up to v2 is supported:

2024-07-02 11:14:43 PDT kurtis@Kurtiss-MacBook-Pro.local # docker buildx ls
NAME/NODE           DRIVER/ENDPOINT     STATUS    BUILDKIT   PLATFORMS
default             docker
 \_ default          \_ default         running   v0.13.2    linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
desktop-linux*      docker
 \_ desktop-linux    \_ desktop-linux   running   v0.13.2    linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

Would it be possible to add support for amd64/v3?

tonistiigi commented 2 days ago

Support for this doesn't depend on us but what amd64 instructions the emulator (rosetta or qemu-user) can emulate. This is automatically detected based on chip capabilities. You can still use cross-compilation if you want to create amd64/v3 images but you can't run emulated containers that are amd64/v3 capable.