-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile_vs
30 lines (22 loc) · 5.07 KB
/
Dockerfile_vs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ARG BASE_DOCKER_FILE="mcr.microsoft.com/windows/servercore:1903-amd64"
FROM $BASE_DOCKER_FILE
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
RUN mkdir c:\code\automate;mkdir c:\temp\;mkdir c:\code\chromium_git;;mkdir c:\code\chromium_git\depot_tools
RUN Invoke-WebRequest 'https://aka.ms/vscollect.exe' -OutFile 'C:\TEMP\collect.exe';
RUN Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe' -OutFile 'c:\code\chromium_git\depot_tools\;';
RUN Invoke-WebRequest 'https://www.7-zip.org/a/7z1801-x64.msi' -OutFile '/code/7zip.msi';
RUN Start-Process msiexec.exe -Wait -ArgumentList '/i c:\code\7zip.msi /quiet /norestart /L*v install.log'
WORKDIR "Program Files"
#Powershell 50 char limit fix
RUN Remove-Item -Recurse -Force '.\WindowsPowerShell\Modules\PSReadLine'
WORKDIR c:\\code\\chromium_git\\depot_tools
#Not sure why the community installer doesn't instal the debugger with --all but all the same this is a quick fix.
RUN Invoke-WebRequest https://go.microsoft.com/fwlink/?linkid=2120843 -OutFile 'C:\code\winsdksetup.exe';
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\winsdksetup.exe -ArgumentList ' /features OptionId.WindowsDesktopDebuggers /quiet /Log #"%TEMP%\\winsdksetup.log /norestart'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { $log_path=$env:Temp; $err = 'Install ' + 'failed with exit code 0x{0:x} error logs in: ' + $log_path + '\winsdksetup.log'; throw ($err -f $ret) }
RUN Invoke-WebRequest 'https://aka.ms/vs/16/release/vs_community.exe' -OutFile 'C:\code\vs_community.exe';
#3010 is fine, as that is just restart requested.
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
# Some of these are more needed for cefsharp like 4.5.2 and 4.6.2 (it uses both targets depending on project)
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\vs_community.exe -ArgumentList ' --quiet --wait --norestart --nocache --add Microsoft.Net.Component.4.7.2.SDK --add Microsoft.NetCore.Component.SDK --add Microsoft.NetCore.Component.Runtime.5.0 --add Microsoft.VisualStudio.Component.Windows10SDK --remove Microsoft.Net.Component.4.6.1.SDK --remove Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 --remove Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.Net.Component.4.5.2.TargetingPack --add Microsoft.Net.Component.4.6.2.TargetingPack --add Microsoft.Net.Component.4.7.2.TargetingPack --add Microsoft.Net.Component.4.6.2.SDK --add Microsoft.VisualStudio.Component.Windows10SDK.18362 --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --remove Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --remove Microsoft.VisualStudio.Component.Windows10SDK.17134 --add Microsoft.VisualStudio.Component.Git --remove Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Component.Android.NDK.R12B --remove Component.Android.SDK23.Private --remove Component.MDD.Android --remove Component.Unreal.Android --remove Component.Android.NDK.R15C --remove Component.Android.SDK19 --remove Component.Android.SDK22 --remove Component.Android.SDK23 --remove Component.Android.SDK25 --remove Component.MDD.Android --remove Component.Android.NDK.R12B --remove Component.Android.NDK.R12B_3264 --remove Component.Android.NDK.R13B --remove Component.Android.NDK.R13B_3264 --remove Component.Android.NDK.R15C_3264 --remove Component.Google.Android.Emulator.API23.V2 --remove Component.Android.SDK25 --remove Component.Google.Android.Emulator.API25 --remove Component.Android.SDK23.Private --remove Component.Google.Android.Emulator.API23.Private --remove Component.Android.Emulator --remove Component.Android.NDK.R11C --remove Component.Android.NDK.R11C_3264 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator --remove Microsoft.VisualStudio.Component.Phone.Emulator.15063 --remove Component.Anaconda3.x64 --remove Component.Anaconda2.x64 --remove Component.Anaconda2.x86 --remove Component.Anaconda3.x86 --remove Microsoft.VisualStudio.Component.Unity --remove Component.UnityEngine.x64 --remove Component.UnityEngine.x86 --remove Component.Incredibuild --remove Component.IncredibuildMenu --remove Microsoft.VisualStudio.Component.Sharepoint.Tools --remove Microsoft.VisualStudio.Component.TeamOffice --remove Component.Cocos;'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { C:\TEMP\collect.exe;$log_path = $env:Temp;$err='Install failed with exit code 0x{0:x} error logs in: ' + $log_path + '\vslogs.zip'; throw ($err -f $ret) }; Remove-Item -Recurse -Force 'c:\ProgramData\Package Cache\'
RUN $env:Path = 'c:/program files/dotnet/;' + $env:Path;setx /M PATH $env:Path;