Skip to content

Instantly share code, notes, and snippets.

@am11
Last active December 2, 2019 14:47
Show Gist options
  • Save am11/826911cbf6c26ea1de4747176ca2b57c to your computer and use it in GitHub Desktop.
Save am11/826911cbf6c26ea1de4747176ca2b57c to your computer and use it in GitHub Desktop.
CoreRT windows docker
FROM microsoft/windowsservercore
RUN powershell curl https://aka.ms/vs/15/release/vs_buildtools.exe -O vs_buildtools.exe
RUN powershell curl https://github.com/git-for-windows/git/releases/download/v2.24.0.windows.2/Git-2.24.0.2-64-bit.exe -O git-setup.exe
RUN powershell curl https://cmake.org/files/v3.16/cmake-3.16.0-win64-x64.msi -O cmake-setup.msi
RUN powershell Start-Process git-setup.exe -ArgumentList '/VERYSILENT', '/SUPPRESSMSGBOXES','/CLOSEAPPLICATIONS', '/DIR=C:\git' -Wait
RUN msiexec /i cmake-setup.msi /quiet /norestart && \
setx PATH "%ProgramFiles%\CMake\bin;%PATH%"
RUN mkdir c:\buildtools && \
vs_buildtools.exe \
--layout c:\buildtools \
--lang en-US \
--add Microsoft.VisualStudio.Workload.VCTools \
--add Microsoft.Net.Component.4.6.TargetingPack \
--add Microsoft.Net.Component.4.5.TargetingPack \
--add Microsoft.VisualStudio.Component.NuGet.BuildTools \
--includeRecommended --passive --wait
RUN C:\buildtools\vs_setup.exe --noweb --passive --norestart --wait
ARG grev=master
ARG gfork=dotnet
RUN git clone https://github.com/%gfork%/corert && \
cd corert && \
git fetch && \
git checkout %grev%
WORKDIR corert
RUN build.cmd release skiptests && \
buildscripts\build-packages.cmd release
RUN powershell \
Compress-Archive \
-Path bin\packages \
-DestinationPath "/corert-release.zip"
@am11
Copy link
Author

am11 commented Jan 13, 2018

Build (example):

docker build --build-arg grev=13b5951e7 --build-arg gfork=am11 .

Copy nupkgs:

docker cp <CONTAINER-ID>:\corert-release.zip corert-release.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment