Skip to content

Commit

Permalink
Revert Windows Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
anhappdev committed Aug 1, 2023
1 parent 342bddc commit 363ecba
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions flutter/windows/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
# escape=`
FROM mcr.microsoft.com/windows:1809

# Use the latest Windows Server Core 2022 image.
FROM mcr.microsoft.com/windows/servercore:ltsc2022-amd64

# Restore the default Windows shell for correct batch processing.
# SHELL [ "powershell", "-command" ]
SHELL ["cmd", "/S", "/C"]

RUN `
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
`
# Install Build Tools with additional some workloads, excluding workloads and components with known issues.
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
--remove Microsoft.VisualStudio.Component.Windows81SDK `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
`
# Cleanup
&& del /q vs_buildtools.exe

ENV chocolateyVersion=1.4.0
RUN powershell Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

RUN curl -fSLo vs_BuildTools.exe https://aka.ms/vs/16/release/vs_buildtools.exe `
&& start /w vs_BuildTools --quiet --norestart --nocache --wait`
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
&& powershell -Command "if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { throw $err }" `
&& del vs_BuildTools.exe

# --no-progress is required on all `choco install` commands
# because on CI where the output is not a terminal but a file
# choco generates literally megabytes of progress update lines
Expand Down

0 comments on commit 363ecba

Please sign in to comment.