命令在 Docker 图像上rmdir /S /Q
给出Access Denied
我(应该是)同一个用户......为什么?
Dockerfile:
# escape=`
FROM mcr.microsoft.com/windows/nanoserver:1809
WORKDIR c:\build
COPY grafana-*.windows-amd64.zip grafana.windows-amd64.zip
COPY grafana-piechart-panel-*.zip grafana-piechart-panel.zip
WORKDIR c:\7zip
ADD 7z1900-x64 .
WORKDIR c:\
RUN c:\7zip\7z.exe x c:\build\grafana.windows-amd64.zip -y
RUN move grafana-* grafana
WORKDIR c:\grafana\data\plugins
RUN c:\7zip\7z.exe x c:\build\grafana-piechart-panel.zip -y
RUN rmdir /S /Q c:\build
WORKDIR c:\grafana
CMD c:\grafana\bin\grafana-server.exe
EXPOSE 3000
输出:
...
Removing intermediate container ac12af383235
---> e5e9b16baf92
Step 12/15 : RUN rmdir /S /Q c:\build
---> Running in 25605150cb02
c:\build\grafana-piechart-panel.zip - Access is denied.
c:\build\grafana.windows-amd64.zip - Access is denied.
Access is denied.
The command 'cmd /S /C rmdir /S /Q c:\build' returned a non-zero code: 5