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

Microsoft AZ-800 Exam - Topic 3 Question 82 Discussion

Actual exam question for Microsoft's AZ-800 exam
Question #: 82
Topic #: 3
[All AZ-800 Questions]

SIMULATION

Task 5

You have an application that is copied to a folder named C:\app on SRV1. C:\app also contains also a Dockerfile for the app.

On SRV1. you need to create a container image for the application by using the Dockerfile. The container image mutt be named app1.

Show Suggested Answer Hide Answer
Suggested Answer: A

Explore

To create a container image named app1 for your application using the Dockerfile in the C:app directory on SRV1, follow these steps:

Step 1: Open PowerShell or Command Prompt First, open PowerShell or Command Prompt on SRV1.

Step 2: Navigate to the Application Directory Change to the directory where your application and Dockerfile are located:

cd C:app

Step 3: Build the Container Image Use the docker build command to create the container image. The -t flag tags the image with the name app1:

docker build -t app1 .

The period . at the end of the command tells Docker to use the Dockerfile in the current directory.

Step 4: Verify the Image Creation After the build process completes, verify that the image app1 has been created successfully by listing all images:

docker images

You should see app1 in the list of images.

Step 5: Use the Image Now, you can use the image app1 to run containers or push it to a container registry if needed.

By following these steps, you'll have created a Docker container image named app1 using the Dockerfile located in C:app on SRV11. Ensure that Docker is installed on SRV1 and that you have the necessary permissions to execute these commands.


Contribute your Thoughts:

0/2000 characters
Elinore
2 days ago
I recall that we might need to check if Docker is running on SRV1 before executing the build command.
upvoted 0 times
...
Linn
8 days ago
I’m a bit confused about how to name the image correctly. Is it `-t app1` or something else?
upvoted 0 times
...
Jose
13 days ago
I practiced something similar last week, and I believe we have to specify the context as `C:\app` when building the image.
upvoted 0 times
...
Dyan
18 days ago
I think I remember we need to use the `docker build` command to create the image from the Dockerfile, but I'm not sure about the exact syntax.
upvoted 0 times
...

Save Cancel