瀏覽代碼

docs: correct the placement constraints `docker service` example

- the constraint expression needs to be quoted
- add an actual redis container to run so the command line works

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
(cherry picked from commit c37da1792d232b5a8545227d5819bb245df16023)
Signed-off-by: Tibor Vass <tibor@docker.com>
Anil Madhavapeddy 9 年之前
父節點
當前提交
12e32363e9
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      docs/reference/commandline/service_create.md

+ 2 - 1
docs/reference/commandline/service_create.md

@@ -172,7 +172,8 @@ node type label equals queue:
 ```bash
 ```bash
 $ docker service create \
 $ docker service create \
   --name redis_2 \
   --name redis_2 \
-  --constraint node.labels.type == queue
+  --constraint 'node.labels.type == queue' \
+  redis:3.0.6
 ```
 ```
 
 
 ## Related information
 ## Related information