Skip to content

Instantly share code, notes, and snippets.

@lucj
Created September 12, 2016 19:15
Show Gist options
  • Save lucj/cd45af09a113a7cfc51f3d4992aa38c9 to your computer and use it in GitHub Desktop.
Save lucj/cd45af09a113a7cfc51f3d4992aa38c9 to your computer and use it in GitHub Desktop.
hybrid-swarm-service-constraint
pi@manager1:~ $ docker service create --name web --replicas 6 --constraint 'node.labels.arc == x64' nginx
e0bzdnji3te4ha8l7wx33ig6x
pi@manager1:~ $ docker service ls
ID NAME REPLICAS IMAGE COMMAND
e0bzdnji3te4 web 6/6 nginx
pi@manager1:~ $ docker service ps web
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
2sqozr8z9i494pyzjpyg0ioue web.1 nginx worker1 Running Running 18 seconds ago
61go9iipq2yjs0y5mg1wxa7ji web.2 nginx worker2 Running Running 18 seconds ago
79ac8h92bug13hbapeq7v31br web.3 nginx worker1 Running Running 18 seconds ago
atog7zw42zje1131fvlqnosxn web.4 nginx worker2 Running Running 18 seconds ago
02uoqxh51ew3cal4zhu0p4v98 web.5 nginx worker1 Running Running 18 seconds ago
18x8x31nlr6zjscbv6yjpleub web.6 nginx worker2 Running Running 18 seconds ago
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment