Merge pull request #24628 from vdemeester/service-doc-fixes

Service doc fixes
This commit is contained in:
Sebastiaan van Stijn 2016-07-14 11:38:07 +02:00 committed by GitHub
commit e7e9f753e8
4 changed files with 15 additions and 19 deletions

View file

@ -119,14 +119,11 @@ Labels:
Mode: REPLICATED
Replicas: 5
Placement:
Strategy: Spread
UpdateConfig:
Parallelism: 0
ContainerSpec:
Image: nginx:alpine
Resources:
Reservations:
Limits:
Ports:
Name =
Protocol = tcp

View file

@ -17,19 +17,25 @@ Usage: docker service update [OPTIONS] SERVICE
Update a service
Options:
--arg value Service command args (default [])
--constraint value Placement constraints (default [])
--args string Service command args
--constraint-add value Add or update placement constraints (default [])
--constraint-rm value Remove a constraint (default [])
--endpoint-mode string Endpoint mode (vip or dnsrr)
-e, --env value Set environment variables (default [])
--env-add value Add or update environment variables (default [])
--env-rm value Remove an environment variable (default [])
--help Print usage
--image string Service image tag
-l, --label value Service labels (default [])
--label-add value Add or update service labels (default [])
--label-rm value Remove a label by its key (default [])
--limit-cpu value Limit CPUs (default 0.000)
--limit-memory value Limit Memory (default 0 B)
--mount value Attach a mount to the service
--mount-add value Add or update a mount on a service
--mount-rm value Remove a mount by its target path (default [])
--name string Service name
--network value Network attachments (default [])
-p, --publish value Publish a port as a node port (default [])
--network-add value Add or update network attachments (default [])
--network-rm value Remove a network by name (default [])
--publish-add value Add or update a published port (default [])
--publish-rm value Remove a published port by its target port (default [])
--registry-auth Send registry authentication details to Swarm agents
--replicas value Number of tasks (default none)
--reserve-cpu value Reserve CPUs (default 0.000)
@ -54,7 +60,7 @@ for further information.
### Update a service
```bash
$ docker service update --limit-cpu 2 redis
$ docker service update --limit-cpu 2 redis
```
## Related information

View file

@ -33,7 +33,6 @@ about a service in an easily readable format.
Mode: REPLICATED
Replicas: 1
Placement:
Strategy: SPREAD
UpdateConfig:
Parallelism: 1
ContainerSpec:

View file

@ -44,22 +44,19 @@ every 10 seconds:
3. Inspect the `redis` service:
```bash
$ docker service inspect redis --pretty
$ docker service inspect --pretty redis
ID: 0u6a4s31ybk7yw2wyvtikmu50
Name: redis
Mode: Replicated
Replicas: 3
Placement:
Strategy: Spread
UpdateConfig:
Parallelism: 1
Delay: 10s
ContainerSpec:
Image: redis:3.0.6
Resources:
Reservations:
Limits:
```
4. Now you can update the container image for `redis`. The swarm manager
@ -81,15 +78,12 @@ desired state:
Mode: Replicated
Replicas: 3
Placement:
Strategy: Spread
UpdateConfig:
Parallelism: 1
Delay: 10s
ContainerSpec:
Image: redis:3.0.7
Resources:
Reservations:
Limits:
```
6. Run `docker service tasks <TASK-ID>` to watch the rolling update: