use add instead of invoke web request in nanoserver docker file (#6255)

This commit is contained in:
Travis Plunk
2018-03-12 16:40:29 -07:00
parent ea4ec0a373
commit a2d8a94376
+1 -1
View File
@@ -17,7 +17,7 @@ ENV PS_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN if (!($env:PS_VERSION -match '^\d+\.\d+\.\d+(-\w+(\.\d+)?)?$' )) {throw ('PS_Version ({0}) must match the regex "^\d+\.\d+\.\d+(-\w+(\.\d+)?)?$"' -f $env:PS_VERSION)}
RUN Invoke-WebRequest $Env:PS_DOWNLOAD_URL -OutFile powershell.zip
ADD $PS_DOWNLOAD_URL /powershell.zip
RUN Expand-Archive powershell.zip -DestinationPath \PowerShell