ExamGecko
Question list
Search
Search

Question 430 - 200-901 discussion

Report
Export

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

Answers
A.

docker build -t cust321453857-rep -f Dockerfile

B.

docker build cust321453857-rep -f Dockerfile.txt

Answers
B.

docker build cust321453857-rep -f Dockerfile.txt

C.

docker build cust321453857-rep Dockerfile

Answers
C.

docker build cust321453857-rep Dockerfile

D.

docker build -t cust321453857-rep Dockerfile.txt

Answers
D.

docker build -t cust321453857-rep Dockerfile.txt

Suggested answer: A

Explanation:

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


asked 07/10/2024
Mario Perez Hervas
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first