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 (vip or dnsrr)
  • --entrypoint= β€” overwrite the default ENTRYPOINT of 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 (default 0 = 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 (-1 for unlimited)
  • --memory-swappiness=-1 β€” tune memory swappiness (0-100), -1 to 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-specified HEALTHCHECK
  • --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 (-1000 to 1000)
  • --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 (default 0 = 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 (0 to 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 (0 to 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>-add and <something>-rm pairs. the -add ones add or update, the -rm ones 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