AZ-303 Exam QuestionsBrowse all questions from this exam

AZ-303 Exam - Question 264


You have a server named Server1 that runs Windows Server 2019. Server1 is a container host.

You plan to create a container image.

You create the following instructions in a text editor.

FROM mcr.microsoft.com/windows/servercore:lts2019

LABEL maintainer="[email protected]"

RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart

RUN echo "Hello World!" > c:\inetpub\wwwroot\index.html

You need to be able to automate the container image creation by using the instructions.

To which file should you save the instructions?

Show Answer
Correct Answer: B

To automate the creation of a container image using Docker, the instructions need to be saved in a file named 'Dockerfile'. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. The instructions provided match the expected format and syntax used in Dockerfiles, which includes commands like FROM, LABEL, RUN, and more.

Discussion

8 comments
Sign in to comment
Stephan99
Jan 13, 2021

answer is correct. https://docs.microsoft.com/en-us/dotnet/architecture/microservices/docker-application-development-process/docker-app-development-workflow

rdemontis
Jul 14, 2021

Correct

syu31svc
Aug 29, 2021

This is Dockerfile file for sure; the rest are completely invalid B 101%

Dpejic
Nov 22, 2021

On exam today 22/11/21 Score 839

awalaoOption: B
Dec 4, 2021

B 100%

kristhiankOption: B
Jan 4, 2022

B - 700%

nd78
Jan 22, 2022

on Exam today 21st Jan, 2022

moon2351
Feb 8, 2022

Answer is correct