Microsoft

AZ-800 practice question 146

Administering Windows Server Hybrid Core Infrastructure · free question 146 of 246

Question

You deploy a Windows Server container host. You need to create a container image that will be based on the Nano Server base image and will contain a custom file. Which four commands should you run in sequence? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.

Explanation

1. docker pull downloads the Nano Server base image (for example mcr.microsoft.com/windows/nanoserver:ltsc2022). 2. docker run -it starts a container from that image with an interactive session. Inside it you create the custom file (for example echo "Hello World!" > Hello.txt) and then exit. 3. docker commit <container-ID> <new-image-name> saves the changes made in the container as a new image that includes the custom file. 4. docker images lists the local images so you can confirm that the new image exists. There is no docker add command (ADD is a Dockerfile instruction). docker build creates an image from a Dockerfile, which this procedure does not use.

Need the theory? Learn it free in the AZ-800 course on Godlike Academy

Practice the whole free set

AZ-800 is a free exam: all 300 questions with instant feedback, plus Learn and Exam modes and PDF export, free.