No suitable node (unsupported platform on 1 node) on m1 chip

Hi, maybe someone may help me.
I’m getting an error " no suitable node (unsupported platform on 1 node)" and can’t scale any services. Images were built on x86 Linux.

I’m on m1 pro chip.
macOS: 13.2
docker: 4.16.2
beta feature "Use Rosetta for x86/amd64 emulation on Apple Silicon is turned ON

I guess you are using Docker Swarm. To be honest I don’t know if Swarm supports the platform option, but the beta feature to use Rosetta will not make the node amd64 host so the scheduler could see that you have an arm64 (aarch64) node so the container will not be created on that node. Rosetta just replaces qemu to run an amd64 container if you define the platform option.

docker run --rm -it --platform linux/amd64 bash
bash-5.2# ps auxf
PID   USER     TIME  COMMAND
    1 root      0:00 {bash} /rosetta/rosetta /usr/local/bin/bash
    7 root      0:00 /bin/ps auxf
1 Like

@rimelek thank you for your reply it helped me to solved my issue. I encounter the same issue with docker.io/bitnami/redis:7.0 image.

When I run it with docker swarm on my Mac M1, I encounter the same error:

no suitable node (unsupported platform on 1 node)

I understand what that means but what misleads me was one thing, I was able to run container with docker run command:

docker run -ti --rm docker.io/bitnami/redis:7.0 /bin/bash
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
redis 14:10:46.50
redis 14:10:46.52 Welcome to the Bitnami redis container
redis 14:10:46.55 Subscribe to project updates by watching https://github.com/bitnami/containers
redis 14:10:46.57 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redis 14:10:46.59

I have no name!@de6d0365d0a5:/$

You can see, there is only WARNING about it. When I run it with option --platform linux/amd64:

docker run -ti --platform linux/amd64 --rm docker.io/bitnami/redis:7.0 /bin/bash
redis 14:22:37.29
redis 14:22:37.32 Welcome to the Bitnami redis container
redis 14:22:37.34 Subscribe to project updates by watching https://github.com/bitnami/containers
redis 14:22:37.36 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redis 14:22:37.38

I have no name!@d772ffe1da5f:/$

The WARNING is gone.

I tried to set platform in docker service, but received error:

services.redis Additional property platform is not allowed

That means, I cant to deploy it on my MAC as Docker Swarm service. But when I run it with docker compose, everything works (even without defining platform).

There is no scheduler involved in Docker without swarm. You just run the the container and the emulator does its job in Docker Desktop. In case of Docker Swarm, the scheduler has to choose a server. Since you can have different servers in a cluster, the container will be started on one that has a matching architecture, which will not happen if there is no matching architecture. You could try to emulate a host operating system using UTM

and use that as a Docker host instead of Docker Desktop. Since emulation is not perfect, its not guaranteed that it will work perfectly.