Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 255
A developer has built a Docker image named 'devcor12a3b456789' using the Dockerfile named ‘devcor98b7a654321' and now needs to containerize it. Which command must the developer use?
Answer options
- A. docker run --name devcor12a3b456789 -i -t devcorapp
- B. docker run --name devcorapp -i -t devcor12a3b456789
- C. docker build --name devcor12a3b456789 -i devcorapp
- D. docker build --name devcorapp -i devcor12a3b456789
Correct answer: B
Explanation
The correct command is B because it runs the container named 'devcorapp' from the image 'devcor12a3b456789'. Option A incorrectly attempts to name the container with the image name, while options C and D are incorrect as they use the 'docker build' command, which is not used for running containers.