abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
17.73k stars 364 forks source link

multi-platform builds fail #1057

Open vincer opened 2 days ago

vincer commented 2 days ago

Description

When running docker build --platform linux/amd64,linux/arm64 . I get:

ERROR: Multi-platform build is not supported for the docker driver.
Switch to a different driver, or turn on the containerd image store, and try again.
Learn more at https://docs.docker.com/go/build-multi-platform/

Per this issue comment it sounds like this should work out of the box.

buildx says it's using Colima:

NAME/NODE       DRIVER/ENDPOINT   STATUS    BUILDKIT               PLATFORMS
colima*         docker
 \_ colima       \_ colima        running   v0.11.7+435cb77e369c   linux/arm64, linux/amd64, linux/amd64/v2
default                           error
desktop-linux                     error

Cannot load builder default: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Cannot load builder desktop-linux: Cannot connect to the Docker daemon at unix:///Users/vince/.docker/run/docker.sock. Is the docker daemon running?

I tried recreating the buildx builder, recreating the Colima instance and always get that message which refers me to Docker Desktop docs to enable the "containerd image store". Is there an equivalent step for Colima or some other step I need to take?

Version

git commit: c3a31ed05f5fab8b2cdbae835198e8fb1717fd0f

runtime: docker
arch: aarch64
client: v27.0.3
server: v24.0.9
limactl version 0.22.0
qemu-img version 9.0.1
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

Output of colima status

INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/vince/.colima/default/docker.sock

Reproduction Steps

docker build --platform linux/amd64,linux/arm64 .

Expected behaviour

A multi-platform image is built.

Additional context

No response

Noksa commented 22 hours ago

This should help

docker buildx create --use --name super-builder