Docker Community Forums

Share and learn in the Docker community.

How can I bring up a windows image on a mixed swarm?

I have a docker swarm that has 5 ubuntu nodes and one windows node. how can I run a windows container and have it directed to the windows host ?

do I use labels for this, how exactly do I do this so that the container will be brought up on the correct node???

I was able to get this working by using the following command on the Windows node: docker node update --label-add os=windows nodename. And then using something like this to create the service: docker service create --constraint ‘node.labels.os==windows’ --replicas 1 --name servicename imagename.