无法看到在windows dockerfile中添加的文件夹



我将windows servercore:lts2019图像作为我的基本图像,向其添加一个文件夹并创建我自己的图像,名为"mygitlabpath/windows-2019"。Dockerfile的内容如下:

FROM mcr.microsoft.com/windows/servercore:ltsc2019
ADD folder-z c:/windows/system32/config/systemprofile/folder-z
SHELL ["powershell"] 
RUN ls c:/windows/system32/config/systemprofile/folder-z ( at this step i see all contents of folder-z)

现在我使用我创建的这个映像并尝试访问c:/windows/system32/config/systemprofile/folder-z,但是没有这样的文件夹叫做folder-z:

image: mygitlabpath/windows-2019
stages:
- build
build:
stage: build
script:
- ls c:/windows/system32/config/systemprofile/ ( at this step i expect to see folder-z.. but i dont) 

我错过了什么?任何帮助都是感激的

感谢

您应该使用COPY而不是ADD

最新更新