This commit is contained in:
glennc 2015-10-14 10:37:56 -07:00
Родитель f67e71b553
Коммит 1469a6ef1b
2 изменённых файлов: 27 добавлений и 0 удалений

9
1.0.0-beta8/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,9 @@
FROM windowsservercore
#Globally install DNVM in program data.
ADD globalinstall.ps1 /Windows/Temp/globalinstall.ps1
RUN powershell -executionpolicy unrestricted C:\Windows\Temp\globalinstall.ps1
#Install DNVM globally on the machine and set it as persistent. This modifies the user path to have DNX on it.
#if the user trying to run DNX is not the same as the installing user then the path to the DNX will need to be specified.
RUN DNVM install 1.0.0-beta8 -global -persistent

Просмотреть файл

@ -0,0 +1,18 @@
Param (
[Parameter(ParameterSetName='InstallPath')]
[string]$InstallPath='c:\ProgramData\Microsoft DNX\bin'
)
if (!(Test-Path $InstallPath)) { md $InstallPath | Out-Null }
$dnvmPs1Path = Join-Path $InstallPath "dnvm.ps1"
$dnvmCmdPath = Join-Path $InstallPath "dnvm.cmd"
$webClient = New-Object System.Net.WebClient
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $dnvmPs1Path)
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.cmd', $dnvmCmdPath)
$oldPath = [Environment]::GetEnvironmentVariable("PATH", "MACHINE")
[Environment]::SetEnvironmentVariable("PATH", "$oldPath;$InstallPath", "MACHINE")