From 674e99cfbbef1ef6ffe37039d68f1a5899a1c4c2 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Wed, 9 Aug 2017 11:16:12 -0400 Subject: [PATCH] Inception --- Dockerfile | 16 ++++++++++++++++ set_windows_path.ps1 | 1 + 2 files changed, 17 insertions(+) create mode 100755 Dockerfile create mode 100644 set_windows_path.ps1 diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..da73008 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM microsoft/dotnet-framework:3.5 + +SHELL ["powershell", "-NoProfile -ExecutionPolicy Bypass -Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + + +RUN Invoke-WebRequest "https://aka.ms/vs/15/release/vs_BuildTools.exe" -OutFile vs_BuildTools.exe -UseBasicParsing ; \ + Start-Process -FilePath 'vs_BuildTools.exe' -ArgumentList '--quiet', '--norestart', '--locale en-US', '--add Microsoft.VisualStudio.Component.VC.CoreBuildTools', '--add Microsoft.VisualStudio.Component.Windows10SDK', '--add Microsoft.Net.Component.4.6.1.SDK', '--add Microsoft.Net.Component.4.6.1.TargetingPack', '--add Microsoft.VisualStudio.Component.VC.ATL', '--add Microsoft.VisualStudio.Component.VC.CLI.Support', '--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64', '--add Microsoft.VisualStudio.Component.Windows10SDK.10586', '--add Microsoft.VisualStudio.Component.VC.Modules.x86.x64', '--add Microsoft.Component.VC.Runtime.UCRTSDK', '--add Microsoft.VisualStudio.Component.Windows81SDK ' -Wait ; \ + Remove-Item .\vs_BuildTools.exe ; \ + Remove-Item -Force -Recurse 'C:\Program Files (x86)\Microsoft Visual Studio\Installer' +RUN Add-WindowsFeature Net-Framework-Core -Source d:\sources\sxs +RUN setx /M PATH $($Env:PATH + ';' + ${Env:ProgramFiles(x86)} + '\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin;' + ${Env:ALLUSERSPROFILE} + '\chocolatey\bin;C:\python27;c:\bts\external') +RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +RUN choco install git python2 cmake unzip -y +ADD ./set_windows_path.ps1 c:/set_windows_path.ps1 +RUN powershell -Command c:\set_windows_path.ps1 + diff --git a/set_windows_path.ps1 b/set_windows_path.ps1 new file mode 100644 index 0000000..b93b5e2 --- /dev/null +++ b/set_windows_path.ps1 @@ -0,0 +1 @@ +[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\cmake\bin", [EnvironmentVariableTarget]::Machine) \ No newline at end of file