1

Copy error while running docker build

My docker file is

escape=`

ARG WIN_VER="ltsc2019"

FROM mcr.microsoft.com/windows/servercore:$WIN_VER

visual c++

WORKDIR D:\DockerProject\
CMD D:
COPY Install.cmd D:\DockerProject\temp\
ADD https://aka.ms/vscollect.exe D:\DockerProject\collect.exe

Download channel for fixed install.

ARG CHANNEL_URL=https://aka.ms/vs/15/release/channel
ADD ${CHANNEL_URL} D:\DockerProject\TEMP\VisualStudio.chman

Download and install Build Tools for Visual Studio 2017 for native desktop workload.

ADD https://aka.ms/vs/15/release/vs_buildtools.exe D:\DockerProject\TEMP\vs_buildtools.exe
RUN D:\DockerProject\TEMP\Install.cmd D:\DockerProject\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache --channelUri D:\DockerProject\TEMP\VisualStudio.chman --installChannelUri D:\DockerProject\TEMP\VisualStudio.chman --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --installPath D:\DockerProject\Installs

Use developer command prompt and start PowerShell if no other command specified.

ENTRYPOINT D:\DockerProject\Installs\Common7\Tools\VsDevCmd.bat &&
CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

sohail dua
  • 21
  • 1
  • 5
  • what does this have to do with powershell? i don't see any PoSh stuff in what you show ... – Lee_Dailey Dec 27 '20 at 18:03
  • I have added a image also i am kept getting a error if runs the same command on powershell it runs fine but giving issue "invalid COPY: Windows does not support destinations not on the system drive (C:)" with docker @Lee_Dailey – sohail dua Dec 27 '20 at 18:48
  • thank you for the added info. [*grin*] ///// windows DOES support drives other than `c:`, so that error is _probably_ from your docker stuff, not from PoSh or from windows itself. – Lee_Dailey Dec 27 '20 at 19:18
  • i think you skiped a step, see this answer: https://stackoverflow.com/questions/40225407/add-d-drive-to-windows-server-2016-docker-images – unsoop Dec 28 '20 at 21:48

0 Answers0