exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 183 discussion

Actual exam question from Cisco's 200-901
Question #: 183
Topic #: 1
[All 200-901 Questions]

A developer has created a new image to use in a Docker build and has added a tag for the image by using the command:
$ docker tag 84fe411926287 local/app:0.4
Which command must be executed next to build the Docker image using the tag?

  • A. $ docker build -p local/app:0.4
  • B. $ docker run -t local/app:0.4
  • C. $ docker run -p local/app:0.4
  • D. $ docker build -t local/app:0.4
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
macxsz
Highly Voted 2 years, 5 months ago
Selected Answer: D
D. build is used to build the image and -t is the option for tags. run could also be used but it also starts the app and it does not say it needs to start
upvoted 5 times
...
rtg2123
Most Recent 1 year, 9 months ago
How about this? Why the answer si D and not B?
upvoted 1 times
rtg2123
1 year, 9 months ago
From my point of view the question is wrong, because it says that the image already exists and have a tag and after that is asking how you can build the image, but if the image exist and already have a tag I can conclude that it is already builded... Any thought on this?
upvoted 1 times
herrmann69
10 months ago
You are right. Again a terribly worded question. "Which command must be executed next to build the Docker image using the tag?" - none, it was already built and tagged A better question would have been: "Which command can be used to build and tag an image" But even then answer D would not work, since the command $ docker build -t local/app:0.4 is missing the "PATH | URL | - " part of the command.
upvoted 1 times
...
petrus28
1 year, 8 months ago
https://docs.docker.com/engine/reference/commandline/run/ If you check the docker documentation, the option -t on the "docker run" command is related to "--tty" (Allocate a pseudo-TTY). With this, if you check the following documentation, you can see that the -t option on the "docker build" command is related to the "--tag" (Name and optionally a tag in the name:tag format) https://docs.docker.com/engine/reference/commandline/build/
upvoted 2 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...