File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ RUN $download_page = Invoke-WebRequest -UseBasicParsing -Uri 'http://windows.php
1414 $re = 'php-\d .+-nts.+x64\. zip$' ; \
1515 $url = $download_page.links | ? href -match $re | % href | select -First 1; \
1616 $filename = $url.Substring(20); \
17- $checksums = Invoke-WebRequest -Uri 'http://windows.php.net/downloads/releases/sha1sum.txt' ; \
17+ $checksums = Invoke-WebRequest -UseBasicParsing - Uri 'http://windows.php.net/downloads/releases/sha1sum.txt' ; \
1818 $sumpattern = '([0-9A-F]+)\s +' +$filename; \
1919 $checksums.Content.Split(\" `n\" ) | Select-String -Pattern $sumpattern | %{ $sum = $_.Matches[0].Groups[1].Value.ToUpper() }; \
2020 $fullurl = 'http://windows.php.net' + $url; \
21- Invoke-WebRequest -Uri $fullurl -OutFile php.zip; \
21+ Invoke-WebRequest -UseBasicParsing - Uri $fullurl -OutFile php.zip; \
2222 if ((Get-FileHash php.zip -Algorithm sha1).Hash -ne $sum) {exit 1} ; \
2323 Expand-Archive -Path php.zip -DestinationPath c:\p hp; \
2424 [Environment]::SetEnvironmentVariable('PATH' , $env:Path + ';C:\p hp' , [EnvironmentVariableTarget]::Machine); \
You can’t perform that action at this time.
0 commit comments