By default, docker swarm will assume that a service will run on x86 systems and accordingly set the services target platform to amd64
. In the case of our raspis, this results in an error ("no suitable node
") when inspecting the service execution list. This problem can be circumvented by specifying the --no-resolve-image
flag when running docker service create
.
In order to specify compatibility between nodes and services two things need to be done
- The node needs to be specified with a label. This can be done when running
docker node create
by specifying the tag--label cam=true
. When updating the node:docker node update --label-add cam=true
. - The service needs to have a constraint. A constraint may be added via
docker service create --constraint 'node.labels.cam==true' ...
. When updating a node:docker service update --constraint-add 'node.labels.cam==true'