Merge pull request #24628 from vdemeester/service-doc-fixes
Service doc fixes
This commit is contained in:
commit
e7e9f753e8
4 changed files with 15 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,7 +33,6 @@ about a service in an easily readable format.
|
|||
Mode: REPLICATED
|
||||
Replicas: 1
|
||||
Placement:
|
||||
Strategy: SPREAD
|
||||
UpdateConfig:
|
||||
Parallelism: 1
|
||||
ContainerSpec:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue