Bird
0
0

What does the command docker service scale myservice=3 do?

easy📝 Conceptual Q11 of 15
Docker - Swarm
What does the command docker service scale myservice=3 do?
AIt stops the service named 'myservice'.
BIt runs 3 copies of the service named 'myservice'.
CIt updates the service 'myservice' to version 3.
DIt removes the service named 'myservice'.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command structure

    The command docker service scale SERVICE_NAME=NUMBER sets the number of replicas for a service.
  2. Step 2: Apply to the given command

    Here, myservice=3 means run 3 replicas of the service named 'myservice'.
  3. Final Answer:

    It runs 3 copies of the service named 'myservice'. -> Option B
  4. Quick Check:

    Scaling sets replicas = 3 [OK]
Quick Trick: Scale sets number of service copies with SERVICE=NUMBER [OK]
Common Mistakes:
  • Confusing scaling with stopping or removing services
  • Thinking scale changes service version
  • Using wrong syntax without '=' sign

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes