Prepare for env variable usage on Windows containers

This commit is contained in:
Alexey Pustovalov 2024-12-27 19:09:50 +09:00
parent 342916d3fc
commit 91150fde9a

View File

@ -120,6 +120,17 @@ RUN Set-Location -Path $env:SystemDrive\.; `
# exit 1; ` # exit 1; `
}; ` }; `
` `
Write-Host ('Downloading {0} ...' -f $env:PERL_URL); `
Invoke-WebRequest -OutFile $env:TEMP\perl.zip -Uri $env:PERL_URL; `
`
$sha256 = '754f3e2a8e473dc68d1540c7802fb166a025f35ef18960c4564a31f8b5933907'; `
$d_sha256 = (Get-FileHash $env:TEMP\perl.zip -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { `
Write-Host ('Checksum Strawberry Perl ({0}) failed!' -f $d_sha256); `
exit 1; `
}; `
`
Write-Host 'Installing Perl...'; ` Write-Host 'Installing Perl...'; `
Expand-Archive -Path $env:TEMP\perl.zip -DestinationPath $env:SystemDrive\perl\; ` Expand-Archive -Path $env:TEMP\perl.zip -DestinationPath $env:SystemDrive\perl\; `
Remove-Item -Force -Recurse $env:SystemDrive\perl\c\; ` Remove-Item -Force -Recurse $env:SystemDrive\perl\c\; `