Bird
0
0

You want to update a Docker service with 10 replicas using rolling updates. You want to update 3 containers at a time and wait 5 seconds between batches. Which command correctly achieves this?

hard📝 Workflow Q15 of 15
Docker - Swarm
You want to update a Docker service with 10 replicas using rolling updates. You want to update 3 containers at a time and wait 5 seconds between batches. Which command correctly achieves this?
Adocker service update --image myapp:v2 --update-parallelism 3 --update-delay 5s myservice
Bdocker service update --image myapp:v2 --update-parallelism 5 --update-delay 3s myservice
Cdocker service update --image myapp:v2 --update-parallelism 10 --update-delay 0s myservice
Ddocker service update --image myapp:v2 --update-delay 5s myservice
Step-by-Step Solution
Solution:
  1. Step 1: Match update-parallelism to batch size

    To update 3 containers at a time, use --update-parallelism 3.
  2. Step 2: Set delay between batches

    To wait 5 seconds between batches, use --update-delay 5s.
  3. Step 3: Verify full command

    Combining these with the image and service name gives the correct command.
  4. Final Answer:

    docker service update --image myapp:v2 --update-parallelism 3 --update-delay 5s myservice -> Option A
  5. Quick Check:

    Parallelism 3 + delay 5s = correct rolling update command [OK]
Quick Trick: Use --update-parallelism for batch size and --update-delay for wait time [OK]
Common Mistakes:
  • Using wrong parallelism number
  • Omitting update-parallelism option
  • Setting delay but not parallelism

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes