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

This commit is contained in:
Travis Plunk
2018-02-26 18:10:29 -08:00
committed by GitHub
parent c4c47476b0
commit fdc20c8a5d
+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