Bird
0
0

Which of the following is the correct command to deploy a Docker service with orchestration using Docker Swarm?

easy📝 Workflow Q12 of 15
Docker - Swarm
Which of the following is the correct command to deploy a Docker service with orchestration using Docker Swarm?
Adocker service create --name myservice nginx
Bdocker run --name myservice nginx
Cdocker build -t myservice nginx
Ddocker-compose up -d
Step-by-Step Solution
Solution:
  1. Step 1: Identify orchestration command

    Docker Swarm uses docker service create to deploy services with orchestration.
  2. Step 2: Compare other commands

    docker run runs a single container, docker build builds images, and docker-compose up is for Compose, not Swarm service creation.
  3. Final Answer:

    docker service create --name myservice nginx -> Option A
  4. Quick Check:

    Swarm deploy = docker service create [OK]
Quick Trick: Swarm deploy uses 'docker service create' command [OK]
Common Mistakes:
  • Using 'docker run' for orchestration
  • Confusing build commands with deploy
  • Mixing Docker Compose with Swarm commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes