DOCKER(1)
DOCKER(1) β bestie's guide to docker service update π
okay so before we even start β hi, welcome, you're in the Docker User Manuals and this specific page is about updating a service. that's the whole vibe. no cap, it's just "update a service." that's the description. that's it. but the options? bestie. the options are a whole main character. there are NINETY-FOUR of them. i counted. twice. π
πΈ NAME πΈ
docker-service-update β Update a service
yes the name has dashes and the synopsis has spaces, that's just how the docker girlies do it, don't @ me
β¨ SYNOPSIS β¨
docker service update [OPTIONS] SERVICE
one service. lots of options. let's go π«Ά
π DESCRIPTION π
Update a service. π¦
that's it. that's the description. the real lore is in the options below and there are SO many of them. hydrate first. π
π OPTIONS π
okay bestie, deep breath, this is the long part. every single one of these is real and i'm not skipping a single one. periodt.
--args=β the command args for the service π--cap-add=β add Linux capabilities--cap-drop=β drop Linux capabilities--config-add=β add or update a config file on a service--config-rm=β remove a configuration file--constraint-add=β add or update a placement constraint--constraint-rm=β remove a constraint--container-label-add=β add or update a container label--container-label-rm=β remove a container label by its key--credential-spec=β credential spec for managed service account (Windows only, so if you're on Linux this one's not your problem π )-d,--detach[=false]β exit immediately instead of waiting for the service to converge. it's giving "i'm not waiting for the group chat to finish typing" β¨--dns-add=β add or update a custom DNS server--dns-option-add=β add or update a DNS option--dns-option-rm=β remove a DNS option--dns-rm=β remove a custom DNS server--dns-search-add=β add or update a custom DNS search domain--dns-search-rm=β remove a DNS search domain--endpoint-mode=""β endpoint mode (vipordnsrr)--entrypoint=β overwrite the defaultENTRYPOINTof the image--env-add=β add or update an environment variable--env-rm=β remove an environment variable--force[=false]β force update even if no changes require it. chaotic energy, use responsibly π--generic-resource-add=β add a Generic resource--generic-resource-rm=β remove a Generic resource--group-add=β add an additional supplementary user group to the container--group-rm=β remove a previously added supplementary user group from the container--health-cmd=""β command to run to check health π©Ί--health-interval=β time between running the check (ms|s|m|h)--health-retries=0β consecutive failures needed to report unhealthy--health-start-interval=β time between running the check during the start period (ms|s|m|h)--health-start-period=β start period for the container to initialize before counting retries towards unstable (ms|s|m|h)--health-timeout=β maximum time to allow one check to run (ms|s|m|h)--host-add=β add a custom host-to-IP mapping ("host:ip")--host-rm=β remove a custom host-to-IP mapping ("host:ip")--hostname=""β container hostname--image=""β service image tag--init[=false]β use an init inside each service container to forward signals and reap processes--isolation=""β service container isolation mode--label-add=β add or update a service label--label-rm=β remove a label by its key--limit-cpu=β limit CPUs--limit-memory=0β limit Memory--limit-pids=0β limit maximum number of processes (default0= unlimited)--log-driver=""β logging driver for service--log-opt=β logging driver options--max-concurrent=β number of job tasks to run concurrently (default equal to--replicas)--memory-swap=0β swap Bytes (-1for unlimited)--memory-swappiness=-1β tune memory swappiness (0-100),-1to reset to default--mount-add=β add or update a mount on a service--mount-rm=β remove a mount by its target path--network-add=β add a network--network-rm=β remove a network--no-healthcheck[=false]β disable any container-specifiedHEALTHCHECK--no-resolve-image[=false]β do not query the registry to resolve image digest and supported platforms--oom-score-adj=0β tune host's OOM preferences (-1000to1000)--placement-pref-add=β add a placement preference--placement-pref-rm=β remove a placement preference--publish-add=β add or update a published port--publish-rm=β remove a published port by its target port-q,--quiet[=false]β suppress progress output. silent but slaying π€«--read-only[=false]β mount the container's root filesystem as read only--replicas=β number of tasks--replicas-max-per-node=0β maximum number of tasks per node (default0= unlimited)--reserve-cpu=β reserve CPUs--reserve-memory=0β reserve Memory--restart-condition=""β restart when condition is met ("none","on-failure","any")--restart-delay=β delay between restart attempts (ns|us|ms|s|m|h)--restart-max-attempts=β maximum number of restarts before giving up--restart-window=β window used to evaluate the restart policy (ns|us|ms|s|m|h)--rollback[=false]β rollback to previous specification. the "nvm bestie, take it back" button π--rollback-delay=0sβ delay between task rollbacks (ns|us|ms|s|m|h)--rollback-failure-action=""β action on rollback failure ("pause","continue")--rollback-max-failure-ratio=0β failure rate to tolerate during a rollback--rollback-monitor=0sβ duration after each task rollback to monitor for failure (ns|us|ms|s|m|h)--rollback-order=""β rollback order ("start-first","stop-first")--rollback-parallelism=0β maximum number of tasks rolled back simultaneously (0to roll back all at once)--secret-add=β add or update a secret on a service π€«--secret-rm=β remove a secret--stop-grace-period=β time to wait before force killing a container (ns|us|ms|s|m|h)--stop-signal=""β signal to stop the container--sysctl-add=β add or update a Sysctl option--sysctl-rm=β remove a Sysctl option-t,--tty[=false]β allocate a pseudo-TTY--ulimit-add=[]β add or update a ulimit option--ulimit-rm=β remove a ulimit option--update-delay=0sβ delay between updates (ns|us|ms|s|m|h)--update-failure-action=""β action on update failure ("pause","continue","rollback")--update-max-failure-ratio=0β failure rate to tolerate during an update--update-monitor=0sβ duration after each task update to monitor for failure (ns|us|ms|s|m|h)--update-order=""β update order ("start-first","stop-first")--update-parallelism=0β maximum number of tasks updated simultaneously (0to update all at once)-u,--user=""β username or UID (format:[:])--with-registry-auth[=false]β send registry authentication details to swarm agents-w,--workdir=""β working directory inside the container
real talk bestie: a bunch of these flags come in<something>-addand<something>-rmpairs. the-addones add or update, the-rmones remove. that pattern is doing a LOT of heavy lifting on this page and it's honestly iconic. π₯
π¦ SEE ALSO π¦
go read that one too, it's the parent page and it's lowkey the whole lore. iykyk π
okay that's the whole page!! every single flag, every default, every ms|s|m|h, all accounted for. not one skipped. we ate. π
β¨
this little love letter was brought to you by the fine people at Docker Community, dated Oct 2026 β so if you're reading this, hey, you're doing amazing, go update that service, and drink some water. π«Άπβ
π¦ where this page comes from
- alpine 3.24: docker-doc 29.9.2-r0 Β· Apache-2.0
- fedora 43: docker-cli 29.8.2-2.fc43
- fedora 43: docker-cli 29.9.2-2.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
- fedora 44: docker-cli 29.8.2-2.fc44
- fedora 44: docker-cli 29.9.2-2.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- opensuse-leap 16.0: docker 29.7.2_ce-160000.8.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms