Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cisco 200-901 Exam - Topic 6 Question 89 Discussion

A development team needs to containerize an application named 'cust475605674\ A Dockerfile has been created and now the docker build command needs to be run using the current folder to find the Dockerfile. build the image and create a local repository named 'cust321453857-rep' that points to that image. Which command must be used?
A) docker build -t cust321453857-rep -f Dockerfile
B) docker build cust321453857-rep -f Dockerfile.txt
C) docker build cust321453857-rep Dockerfile
D) docker build -t cust321453857-rep Dockerfile.txt

Cisco 200-901 Exam - Topic 6 Question 89 Discussion

Actual exam question for Cisco's 200-901 exam
Question #: 89
Topic #: 6
[All 200-901 Questions]

A development team needs to containerize an application named 'cust475605674\ A Dockerfile has been created and now the docker build command needs to be run using the current folder to find the Dockerfile. build the image and create a local repository named 'cust321453857-rep' that points to that image. Which command must be used?

Show Suggested Answer Hide Answer
Suggested Answer: A

To build a Docker image using the current folder and a specified Dockerfile, and then tag the image with a specific name for the local repository, the following command is used:

docker build: This command builds a Docker image from a Dockerfile.

-t cust321453857-rep: The -t option tags the resulting image with the specified name (cust321453857-rep).

-f Dockerfile: The -f option specifies the Dockerfile to use for building the image.

Command:

docker build -t cust321453857-rep -f Dockerfile .


Docker Build Command: Docker Build

Contribute your Thoughts:

0/2000 characters
Osvaldo
9 months ago
I’m not sure about this, but I thought the Dockerfile should be specified with a path.
upvoted 0 times
...
Rebeca
9 months ago
I think option C is missing the `-t` flag too.
upvoted 0 times
...
Artie
10 months ago
Wait, why is there a `.txt` in option B? That seems off.
upvoted 0 times
...
Billy
10 months ago
Definitely going with option A! Looks right to me.
upvoted 0 times
...
Ernest
10 months ago
The correct command should include the `-t` flag for tagging.
upvoted 0 times
...
Tess
10 months ago
I think the `-f` flag is important for specifying the Dockerfile, but I’m confused about the file extension in some of these options.
upvoted 0 times
...
Alva
11 months ago
I feel like option A is close, but I’m not sure if it needs the `.` at the end to indicate the current directory.
upvoted 0 times
...
Mitsue
11 months ago
I remember practicing a similar question where we had to specify the Dockerfile location, but I can't recall if it was `-f` or something else.
upvoted 0 times
...
Erick
11 months ago
I think the command should include the `-t` flag for tagging the image, but I'm not sure if the syntax is exactly right.
upvoted 0 times
...
Wilson
11 months ago
This seems straightforward. I think option A is the correct answer, but I'll quickly review the other options just to be sure.
upvoted 0 times
...
Elliott
11 months ago
I'm a bit confused by the specific details in the question. I'll need to double-check the Docker documentation to make sure I'm using the right commands.
upvoted 0 times
...
Apolonia
11 months ago
I'm pretty confident I know the answer to this one. The key is using the correct syntax for the docker build command.
upvoted 0 times
...
Detra
11 months ago
Okay, let me think this through step-by-step. We need to build an image and create a local repository for it, so I'll need to use the right Docker commands.
upvoted 0 times
...
Glory
11 months ago
Hmm, this looks like a tricky one. I'll need to carefully read through the question and options to make sure I understand exactly what it's asking.
upvoted 0 times
...
Arlene
2 years ago
Option A is the way to go. If you're not using the -t flag, how are you supposed to show off your mad Docker skills at the next team meeting?
upvoted 0 times
...
Kanisha
2 years ago
I'm going with A as well. Gotta love those straightforward Docker commands, am I right? It's like a secret language that only the true DevOps masters understand.
upvoted 0 times
...
Dulce
2 years ago
Definitely option A. It's the only one that makes sense. The other options either have the wrong flags or the wrong file name. This is a no-brainer, folks.
upvoted 0 times
Nell
2 years ago
Yes, option A is the only one that includes the tag and the correct file name.
upvoted 0 times
...
Natalya
2 years ago
I agree, option A is the way to go. The other options are not correct.
upvoted 0 times
...
Percy
2 years ago
Option A is the correct one. It specifies the tag and the Dockerfile.
upvoted 0 times
...
...
Leatha
2 years ago
Option A seems to be the way to go. I mean, who wants to name their Dockerfile 'Dockerfile.txt'? That's just asking for trouble!
upvoted 0 times
Denny
2 years ago
Allene: Agreed, let's use docker build -t cust321453857-rep -f Dockerfile.
upvoted 0 times
...
Justine
2 years ago
User 3: Let's go with option A then.
upvoted 0 times
...
Allene
2 years ago
User 2: Yeah, naming it 'Dockerfile.txt' seems like a bad idea.
upvoted 0 times
...
Marshall
2 years ago
User 1: I agree, option A is the best choice.
upvoted 0 times
...
...
Ronny
2 years ago
I think the correct answer is A. The command 'docker build -t cust321453857-rep -f Dockerfile' will build the image and create a local repository named 'cust321453857-rep' that points to that image. The -t flag is used to tag the image with a name, and the -f flag specifies the location of the Dockerfile.
upvoted 0 times
Dottie
2 years ago
Let's go ahead and run 'docker build -t cust321453857-rep -f Dockerfile' to containerize the application.
upvoted 0 times
...
Paola
2 years ago
Yes, using the -t flag to tag the image and -f flag to specify the Dockerfile location is the right approach.
upvoted 0 times
...
Ronnie
2 years ago
I agree, option A is the correct command to use.
upvoted 0 times
...
...
Gilberto
2 years ago
I agree with Fallon, option A makes sense because it specifies the tag and the Dockerfile.
upvoted 0 times
...
Fallon
2 years ago
I think the answer is A.
upvoted 0 times
...

Save Cancel