Bird
0
0

Which of these is the correct syntax to scale a Docker service named 'webapp' to 5 replicas?

easy📝 Syntax Q12 of 15
Docker - Swarm
Which of these is the correct syntax to scale a Docker service named 'webapp' to 5 replicas?
Adocker service scale webapp 5
Bdocker service scale -replicas=5 webapp
Cdocker service scale webapp=5
Ddocker scale service webapp=5
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct scale command syntax

    The correct syntax is docker service scale SERVICE_NAME=NUMBER with an equals sign.
  2. Step 2: Match options to syntax

    docker service scale webapp=5 uses webapp=5 which matches the correct syntax.
  3. Final Answer:

    docker service scale webapp=5 -> Option C
  4. Quick Check:

    Correct syntax uses '=' sign [OK]
Quick Trick: Use '=' between service name and replica count [OK]
Common Mistakes:
  • Omitting '=' sign between service and number
  • Using wrong command order
  • Confusing 'docker scale' with 'docker service scale'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes