In this blog post, I will show you how to download a single file to a Windows Server container using a PowerShell command.
Docker gives up the option to connect to a Storage Volume on the host and copy files directly to the Container or from the host,
The problem with volumes is that sometimes you just need to download a single file and you don’t want the trouble of connecting to a volume and start using copy pate.
Below, I am using the invoke-webrequest command to download a single file.
Invoke-WebRequest -Method Get -Uri https://webaddress/win-x64.zip -OutFile c:\win-x64.zip
Because the file is zipped I can also use the PowerShell unzip command to unzip the file as shown below:
Expand-Archive -Path c:\win-x64.zip -DestinationPath c:\