contraint instead of label to create Registry on node1 (#4644)

As the `--label` option is used before in `docker node update --label-add registry=true node1`, the Docker registry should be restricted to only run on `node1` - and nowhere else. So the `docker service create` command has to use the option `--constraint 'node.labels.registry==true` instead of `--label registry=true`- because it is a contraint, where to run the Registry - we don´t just want to set a label again.
pull/3397/head
Jonas Hecht 2017-09-15 20:20:26 +02:00 committed by Misty Stanley-Jones
parent 8b93c50982
commit 1f640d19dd
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ $ docker service create \
--name registry \
--secret domain.crt \
--secret domain.key \
--label registry=true \
--constraint 'node.labels.registry==true' \
--mount src=/mnt/registry,dst=/var/lib/registry \
-e REGISTRY_HTTP_ADDR=0.0.0.0:80 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/run/secrets/domain.crt \