Say that we are working in swarm mode and we have three nodes:
- manager1
- worker1
- worker2
Is it possible to create a service and specify that the tasks only has to run in the workers (worker1 and worker2) and not in the managers (manager1)
I am running the following command to create the service:
docker-machine ssh manager1 "docker service create --network dognet --name dog-db redis"
and when I ps the service:
docker-machine ssh manager1 "docker service ps dog-db"
I get:
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
3kvfpbhl6fj0qwtglc5k7sbkw dog-db.1 redis manager1 Running Preparing 4 seconds ago