CmdID / docker / docker service
docker service update
Update a service Docker CLI reference
94 options Its page in the Docker CLI reference
Options
Show its 94 options
--argsService command args--cap-addAdd Linux capabilities--cap-dropDrop Linux capabilities--config-addAdd or update a config file on a service--config-rmRemove a configuration file--constraint-addAdd or update a placement constraint--constraint-rmRemove a constraint--container-label-addAdd or update a container label--container-label-rmRemove a container label by its key--credential-specCredential spec for managed service account (Windows only)--detach, -dExit immediately instead of waiting for the service to converge--dns-addAdd or update a custom DNS server--dns-option-addAdd or update a DNS option--dns-option-rmRemove a DNS option--dns-rmRemove a custom DNS server--dns-search-addAdd or update a custom DNS search domain--dns-search-rmRemove a DNS search domain--endpoint-modeEndpoint mode (vip or dnsrr)--entrypointOverwrite the default ENTRYPOINT of the image--env-addAdd or update an environment variable--env-rmRemove an environment variable--forceForce update even if no changes require it--generic-resource-addAdd a Generic resource--generic-resource-rmRemove a Generic resource--group-addAdd an additional supplementary user group to the container--group-rmRemove a previously added supplementary user group from the container--health-cmdCommand to run to check health--health-intervalTime between running the check (ms\--health-retriesConsecutive failures needed to report unhealthy--health-start-intervalTime between running the check during the start period (ms\--health-start-periodStart period for the container to initialize before counting retries towards unstable (ms\--health-timeoutMaximum time to allow one check to run (ms\--host-addAdd a custom host-to-IP mapping (host:ip)--host-rmRemove a custom host-to-IP mapping (host:ip)--hostnameContainer hostname--imageService image tag--initUse an init inside each service container to forward signals and reap processes--isolationService container isolation mode--label-addAdd or update a service label--label-rmRemove a label by its key--limit-cpuLimit CPUs--limit-memoryLimit Memory--limit-pidsLimit maximum number of processes (default 0 = unlimited)--log-driverLogging driver for service--log-optLogging driver options--max-concurrentNumber of job tasks to run concurrently (default equal to --replicas)--memory-swapSwap Bytes (-1 for unlimited)--memory-swappinessTune memory swappiness (0-100), -1 to reset to default--mount-addAdd or update a mount on a service--mount-rmRemove a mount by its target path--network-addAdd a network--network-rmRemove a network--no-healthcheckDisable any container-specified HEALTHCHECK--no-resolve-imageDo not query the registry to resolve image digest and supported platforms--oom-score-adjTune host's OOM preferences (-1000 to 1000)--placement-pref-addAdd a placement preference--placement-pref-rmRemove a placement preference--publish-addAdd or update a published port--publish-rmRemove a published port by its target port--quiet, -qSuppress progress output--read-onlyMount the container's root filesystem as read only--replicas-max-per-nodeMaximum number of tasks per node (default 0 = unlimited)--replicasNumber of tasks--reserve-cpuReserve CPUs--reserve-memoryReserve Memory--restart-conditionRestart when condition is met (none, on-failure, any)--restart-delayDelay between restart attempts (ns\--restart-max-attemptsMaximum number of restarts before giving up--restart-windowWindow used to evaluate the restart policy (ns\--rollback-delayDelay between task rollbacks (ns\--rollback-failure-actionAction on rollback failure (pause, continue)--rollback-max-failure-ratioFailure rate to tolerate during a rollback--rollback-monitorDuration after each task rollback to monitor for failure (ns\--rollback-orderRollback order (start-first, stop-first)--rollback-parallelismMaximum number of tasks rolled back simultaneously (0 to roll back all at once)--rollbackRollback to previous specification--secret-addAdd or update a secret on a service--secret-rmRemove a secret--stop-grace-periodTime to wait before force killing a container (ns\--stop-signalSignal to stop the container--sysctl-addAdd or update a Sysctl option--sysctl-rmRemove a Sysctl option--tty, -tAllocate a pseudo-TTY--ulimit-addAdd or update a ulimit option--ulimit-rmRemove a ulimit option--update-delayDelay between updates (ns\--update-failure-actionAction on update failure (pause, continue, rollback)--update-max-failure-ratioFailure rate to tolerate during an update--update-monitorDuration after each task update to monitor for failure (ns\--update-orderUpdate order (start-first, stop-first)--update-parallelismMaximum number of tasks updated simultaneously (0 to update all at once)--user, -uUsername or UID (format: <name\--with-registry-authSend registry authentication details to swarm agents--workdir, -wWorking directory inside the container