#Dagger engine fails start Mac M1

1 messages · Page 1 of 1 (latest)

shut summit
#

Hi,

I've got Mac M1 running Ventura 13.5.2, trying to follow the basic golang get started tutorial and failing when running the line:

dagger run go run ./multibuild/main.go

I'm running the latest dagger cli and dagger 0.8.4

Docker (24.0.5) is logging the following exception when starting the dagger engine container:

buildkitd: plugin type="bridge" failed (add): failed to list chains: running [/sbin/iptables -t nat -S --wait]: exit status 3: iptables v1.8.9 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
CNI setup error
github.com/moby/buildkit/util/network/cniprovider.(*cniProvider).newNS
/go/pkg/mod/github.com/moby/buildkit@v0.12.1-0.20230801135201-2267f0022b35/util/network/cniprovider/cni.go:248
....

Any help would be appreciated.

Regards
Chris

lament pelican
#

cc @north canopy 🙏

north canopy
shut summit
#

Thanks, but no joy, I've already got DOCKER_DEFAULT_PLATFORM=linux/amd64. in my .zprofile

lament pelican
shut summit
#

Sorry, yes unsetting made no difference, still fails

lament pelican
#

hmm maybe trying with Docker for mac 4.23.0? We'll check if someone with a mac can repro with the same DD version

#

@shut summit can you share what this prints for you? docker run --rm --entrypoint "uname" registry.dagger.io/engine:v0.8.4 -a

shut summit
#

Sure: docker run --rm --entrypoint "uname" registry.dagger.io/engine:v0.8.4 -a
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Linux f1bab80e0358 5.15.49-linuxkit-pr #1 SMP PREEMPT Thu May 25 07:27:39 UTC 2023 x86_64 Linux

lament pelican
#

that seems to be the issue. Somehow, your DD is defaulting the architecture to be x86 even though we have arm images

#

this is what it should print:

$ docker run --rm --entrypoint "uname" registry.dagger.io/engine:v0.8.4 -a
Linux 92f8788c8339 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 aarch64 Linux```
shut summit
#

I've deleted the image, I'm rerunning our commnd

#

That's fixed it, must have been that variable being set when I initially ran, then it was just using the same image each time. Thanks for the help!