From 1f640d19dd20141e9ad0fe15b3b5f2f67a185861 Mon Sep 17 00:00:00 2001 From: Jonas Hecht Date: Fri, 15 Sep 2017 20:20:26 +0200 Subject: [PATCH] contraint instead of label to create Registry on node1 (#4644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docs/deploying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deploying.md b/docs/deploying.md index 0e5728079..413cc48a2 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -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 \