github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/service_update.md (about) 1 <!--[metadata]> 2 +++ 3 title = "service update" 4 description = "The service update command description and usage" 5 keywords = ["service, update"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 # service update 12 13 ```Markdown 14 Usage: docker service update [OPTIONS] SERVICE 15 16 Update a service 17 18 Options: 19 --args string Service command args 20 --constraint-add value Add or update placement constraints (default []) 21 --constraint-rm value Remove a constraint (default []) 22 --container-label-add value Add or update container labels (default []) 23 --container-label-rm value Remove a container label by its key (default []) 24 --endpoint-mode string Endpoint mode (vip or dnsrr) 25 --env-add value Add or update environment variables (default []) 26 --env-rm value Remove an environment variable (default []) 27 --help Print usage 28 --image string Service image tag 29 --label-add value Add or update service labels (default []) 30 --label-rm value Remove a label by its key (default []) 31 --limit-cpu value Limit CPUs (default 0.000) 32 --limit-memory value Limit Memory (default 0 B) 33 --log-driver string Logging driver for service 34 --log-opt value Logging driver options (default []) 35 --mount-add value Add or update a mount on a service 36 --mount-rm value Remove a mount by its target path (default []) 37 --name string Service name 38 --network-add value Add or update network attachments (default []) 39 --network-rm value Remove a network by name (default []) 40 --publish-add value Add or update a published port (default []) 41 --publish-rm value Remove a published port by its target port (default []) 42 --replicas value Number of tasks (default none) 43 --reserve-cpu value Reserve CPUs (default 0.000) 44 --reserve-memory value Reserve Memory (default 0 B) 45 --restart-condition string Restart when condition is met (none, on-failure, or any) 46 --restart-delay value Delay between restart attempts (default none) 47 --restart-max-attempts value Maximum number of restarts before giving up (default none) 48 --restart-window value Window used to evaluate the restart policy (default none) 49 --stop-grace-period value Time to wait before force killing a container (default none) 50 --update-delay duration Delay between updates 51 --update-failure-action string Action on update failure (pause|continue) (default "pause") 52 --update-parallelism uint Maximum number of tasks updated simultaneously (0 to update all at once) (default 1) 53 -u, --user string Username or UID (format: <name|uid>[:<group|gid>]) 54 --with-registry-auth Send registry authentication details to Swarm agents 55 -w, --workdir string Working directory inside the container 56 ``` 57 58 Updates a service as described by the specified parameters. This command has to be run targeting a manager node. 59 The parameters are the same as [`docker service create`](service_create.md). Please look at the description there 60 for further information. 61 62 ## Examples 63 64 ### Update a service 65 66 ```bash 67 $ docker service update --limit-cpu 2 redis 68 ``` 69 70 ## Related information 71 72 * [service create](service_create.md) 73 * [service inspect](service_inspect.md) 74 * [service ps](service_ps.md) 75 * [service ls](service_ls.md) 76 * [service rm](service_rm.md)