docker --version: Docker version 26.1.1, build 4cf5afaefa
colima --version: colima version 0.6.8
go version: n/a
Client used (if applicable): n/a
Description
What is the problem: docker build fails on m1 (arm64) mac mini while using colima as a provider
Who is affected: users trying to serve dendrite from an arm Mac
How is this bug manifesting: (see steps to repro)
When did this first appear:
Steps to reproduce
~/Documents/matrix/dendrite $ colima version
colima version 0.6.8
git commit: 9b0809d0ed9ad3ff1e57c405f27324e6298ca04f
runtime: docker
arch: aarch64
client: v26.1.1
server: v24.0.9
~/Documents/matrix/dendrite $ docker build -t matrixdotorg/dendrite-monolith .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 64.91MB
Step 1/23 : FROM --platform=${BUILDPLATFORM} docker.io/golang:1.21-alpine3.18 AS base
failed to parse platform : "" is an invalid component of "": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
However, there's a workaround: ssh into colima's VM, and then issue docker build from there.
I have deleted + re-initialized the colima VM to ensure i was building from a clean slate. I think that this actually might be some kind of an issue with how colima is setting certain variables, or communicating with the docker client. Since I figured out a workaround, i thought I would post it here in case anybody runs into the same issue (but I'm not yet sure why exactly this is happening?).
I did try docker build with --platform arm64 (and others) based on the error message, but that didn't result in anything different.
This issue was originally created by @Amar1729 at https://github.com/matrix-org/dendrite/issues/3370.
Background information
v0.13.7
docker --version
:Docker version 26.1.1, build 4cf5afaefa
colima --version
:colima version 0.6.8
go version
: n/aDescription
docker build
fails on m1 (arm64) mac mini while using colima as a providerdendrite
from an arm MacSteps to reproduce
However, there's a workaround:
ssh
into colima's VM, and then issuedocker build
from there.I have deleted + re-initialized the
colima
VM to ensure i was building from a clean slate. I think that this actually might be some kind of an issue with howcolima
is setting certain variables, or communicating with the docker client. Since I figured out a workaround, i thought I would post it here in case anybody runs into the same issue (but I'm not yet sure why exactly this is happening?).I did try
docker build
with--platform arm64
(and others) based on the error message, but that didn't result in anything different.