Bird
0
0

Which Docker command is used to create a new container from an image for the green environment in a blue-green deployment?

easy📝 Syntax Q12 of 15
Docker - Production Patterns
Which Docker command is used to create a new container from an image for the green environment in a blue-green deployment?
Adocker stop green_container
Bdocker run -d --name green_container myapp:latest
Cdocker push green_container myapp:latest
Ddocker build -t green_container myapp/
Step-by-Step Solution
Solution:
  1. Step 1: Identify command to create and start container

    The docker run command creates and starts a container from an image.
  2. Step 2: Match command to green environment container creation

    docker run -d --name green_container myapp:latest runs the container detached with the name green_container.
  3. Final Answer:

    docker run -d --name green_container myapp:latest -> Option B
  4. Quick Check:

    Run command creates container [OK]
Quick Trick: Use 'docker run' to start new containers [OK]
Common Mistakes:
  • Using 'docker build' which builds images, not containers
  • Using 'docker push' which uploads images to registry
  • Using 'docker stop' which stops containers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes