Bird
0
0

In a CI/CD pipeline, what is the expected output of this command?

medium📝 Predict Output Q5 of 15
Docker - in CI/CD
In a CI/CD pipeline, what is the expected output of this command?
docker run --rm myapp:latest echo Hello
AError: image not found
BHello
CContainer starts but no output
DDocker daemon error
Step-by-Step Solution
Solution:
  1. Step 1: Understand docker run with command

    'docker run --rm myapp:latest echo Hello' runs container and executes 'echo Hello'.
  2. Step 2: Predict output

    The container prints 'Hello' and then exits, removing itself due to --rm.
  3. Final Answer:

    Hello -> Option B
  4. Quick Check:

    docker run echo output = Hello [OK]
Quick Trick: docker run with command prints command output [OK]
Common Mistakes:
  • Expecting no output from echo
  • Confusing --rm with error
  • Assuming container stays running

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes