Bird
0
0

What will happen if you run docker network connect blue_net green_app during a blue-green deployment?

medium📝 Command Output Q5 of 15
Docker - Production Patterns
What will happen if you run docker network connect blue_net green_app during a blue-green deployment?
Agreen_app container is connected to blue_net network
Bblue_net network is deleted
Cgreen_app container is stopped
DAn error occurs because green_app is already connected
Step-by-Step Solution
Solution:
  1. Step 1: Understand docker network connect command

    This command connects a running container to a specified network.
  2. Step 2: Apply to green_app and blue_net

    green_app will be connected to blue_net without stopping or deleting anything.
  3. Final Answer:

    green_app container is connected to blue_net network -> Option A
  4. Quick Check:

    docker network connect adds container to network [OK]
Quick Trick: Connect containers to networks with docker network connect [OK]
Common Mistakes:
  • Thinking network is deleted
  • Assuming container stops
  • Expecting error if container already connected (only if duplicate)

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes