Last active
April 2, 2019 05:42
-
-
Save liyuqian/0a7d8d7d5b5d594b9da4dd81c261f6c6 to your computer and use it in GitHub Desktop.
Windows docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# escape=` | |
FROM mcr.microsoft.com/dotnet/framework/sdk:4.7.2 | |
# Restore the default Windows shell for correct batch processing. | |
SHELL ["cmd", "/S", "/C"] | |
RUN NuGet install GitForWindows -Version 2.21.0 | |
RUN setx path "%path%";C:\GitForWindows.2.21.0\tools\cmd | |
ADD https://storage.googleapis.com/chrome-infra/depot_tools.zip depot_tools.zip | |
RUN powershell Expand-Archive -LiteralPath c:\depot_tools.zip -DestinationPath c:\depot_tools | |
# RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
RUN setx path "%path%";C:\depot_tools | |
# The following line downloads the gclient | |
RUN gclient | |
RUN mkdir flutter\engine | |
WORKDIR c:\flutter\engine | |
ADD https://raw.githubusercontent.com/flutter/engine/master/ci/docker/build/engine_gclient .gclient | |
RUN gclient sync | |
RUN flutter\tools\gn --unoptimized | |
RUN ninja -C out\host_debug_unopt | |
# RUN powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; | |
# RUN powershell Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.2/MinGit-2.12.2.2-64-bit.zip' -OutFile MinGit.zip | |
# RUN powershell Invoke-WebRequest ` | |
# $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' ` | |
# -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing | |
# RUN powershell -Command $ErrorActionPreference = 'Stop' ; \ | |
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ | |
# Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ; \ | |
# Expand-Archive mingit.zip -DestinationPath c:\mingit ; \ | |
# Remove-Item mingit.zip -Force ; \ | |
# setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH) | |
# # Download the Build Tools bootstrapper. | |
# ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe | |
# # Install Build Tools excluding workloads and components with known issues. | |
# RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` | |
# --installPath C:\BuildTools ` | |
# --all ` | |
# --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 | |
# # Start developer command prompt with any other commands specified. | |
# ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat && | |
# Default to PowerShell if no other command specified. | |
# CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment