Bird
0
0

Which Docker command will correctly launch a new container named 'green_app' from the image 'app:v2' for the green environment?

easy📝 Syntax Q3 of 15
Docker - Production Patterns
Which Docker command will correctly launch a new container named 'green_app' from the image 'app:v2' for the green environment?
Adocker start green_app app:v2
Bdocker run -d --name green_app app:v2
Cdocker create green_app app:v2
Ddocker build -t green_app app:v2
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to start a container

    Use 'docker run' to create and start a container from an image.
  2. Step 2: Check the options

    '-d' runs container in detached mode, '--name' assigns the container name.
  3. Final Answer:

    docker run -d --name green_app app:v2 -> Option B
  4. Quick Check:

    'docker run' creates and starts containers [OK]
Quick Trick: 'docker run' creates and starts containers [OK]
Common Mistakes:
  • Using 'docker start' which only starts existing containers
  • Confusing 'docker create' which doesn't start containers
  • Using 'docker build' which builds images, not containers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes