Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AZ-303 topic 3 question 3 discussion

Actual exam question from Microsoft's AZ-303
Question #: 3
Topic #: 3
[All AZ-303 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have a server named Server1 that runs Windows Server 2019. Server1 is a container host.
You are creating a Dockerfile to build a container image.
You need to add a file named File1.txt from Server1 to a folder named C:\Folder1 in the container image.
Solution: You add the following line to the Dockerfile.
Copy-Item File1.txt C:\Folder1\File1.txt
You then build the container image.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Copy is the correct command to copy a file to the container image.
Reference:
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy https://docs.docker.com/engine/reference/builder/

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
azurecert2021
Highly Voted 3 years, 2 months ago
correct Copy-Item is not correct command.
upvoted 10 times
...
Kraviecc
Highly Voted 3 years, 2 months ago
Correct
upvoted 6 times
...
sandeepmalik
Most Recent 2 years ago
In today's exam. Score 900+ Correct answer.
upvoted 1 times
...
edmacoar123
2 years, 4 months ago
Correct. For this task is possible use: ADD test1.txt /temp/ ADD test.txt c:/temp/ COPY test1.txt /temp/ COPY test.txt c:/temp/ https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/manage-windows-dockerfile
upvoted 2 times
...
syu31svc
2 years, 7 months ago
No for sure; no such command for a Dockerfile
upvoted 2 times
...
Cramster
2 years, 8 months ago
Use COPY or ADD to copy files to docker image
upvoted 1 times
...
nfett
2 years, 9 months ago
there is no such command as copy-item https://docs.docker.com/engine/reference/builder/
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...