Question 21 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure
Question
DRAG DROP - You plan to create a Docker image that runs an ASP.NET Core application named ContosoApp.
You have a setup script named setupScript.ps1 and a series of application files including ContosoApp.dll.
You need to create a Dockerfile document that meets the following requirements: -> Call setupScripts.ps1 when the container is built.
-> Run ContosoApp.dll when the container starts.
The Dockerfile document must be created in the same folder where ContosoApp.dll and setupScript.ps1 are stored.
Which five commands should you use to develop the solution? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.
Select and Place:
![Commands
FROM microsoft/aspnetcore: latest
WORKDIR /apps/ContosoApp
CMD ["dotnet", “ContosoApp.d11"]
COPY ./ .
RUN powershell ./setupScript.ps1
Answer Area](https://eaeastus2.blob.core.windows.net/optimizedimages/static/images/Developing-Solutions-for-Microsoft-Azure-(AZ-204)/question/img0007300001.png)
Explanations
![Commands
Answer Area
FROM microsoft/aspnetcore: latest
CMD ["dotnet", “ContosoApp.d11"]
WORKDIR /apps/ContosoApp
FROM microsoft/aspnetcore: latest
CMD ["dotnet", “ContosoApp.d11"]
WORKDIR /apps/ContosoApp
COPY ./ .
COPY ./ .
RUN powershell ./setupScript.ps1
RUN powershell ./setupScript.ps1](https://eaeastus2.blob.core.windows.net/optimizedimages/static/images/Developing-Solutions-for-Microsoft-Azure-(AZ-204)/answer/img0007300002.png)
Box 1: CMD [..] Cmd starts a new instance of the command interpreter, Cmd.exe.
Syntax: CMD <string> Specifies the command you want to carry out.
Box 2: FROM microsoft/aspnetcore-build:latest Box 3: WORKDIR /apps/ContosoApp - Bxo 4: COPY ./
Box 5: RUN powershell ./setupScript.ps1