2019-11-26 17:10:30 +01:00
|
|
|
# escape=`
|
|
|
|
|
|
|
|
# use windows server core image
|
2020-02-20 16:18:26 +01:00
|
|
|
ARG windows_version=ltsc2019
|
|
|
|
FROM mcr.microsoft.com/windows/servercore:${windows_version}
|
2019-11-26 17:10:30 +01:00
|
|
|
|
|
|
|
# install chocolately as package manager
|
2019-12-20 09:21:46 +01:00
|
|
|
RUN powershell -NoProfile -InputFormat None -Command `
|
2019-11-26 17:10:30 +01:00
|
|
|
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) ; `
|
|
|
|
choco feature disable --name showDownloadProgress
|
|
|
|
|
|
|
|
# install Visual Studio build tools
|
|
|
|
RUN powershell -NoProfile -InputFormat None -Command `
|
|
|
|
choco install visualcpp-build-tools `
|
|
|
|
--version 15.0.26228.20170424 -y --params "'/IncludeOptional'" ;`
|
|
|
|
Write-Host 'Waiting for Visual C++ Build Tools to finish'; `
|
|
|
|
Wait-Process -Name vs_installer
|
|
|
|
|
|
|
|
# install other tools as described in https://llvm.org/docs/GettingStartedVS.html
|
|
|
|
# and a few more that were not documented...
|
|
|
|
RUN choco install -y git
|
|
|
|
RUN choco install -y cmake --version 3.15.4
|
2019-12-20 09:47:39 +01:00
|
|
|
RUN choco install -y python3
|
2019-11-26 17:10:30 +01:00
|
|
|
RUN choco install -y ninja
|
|
|
|
RUN choco install -y gnuwin
|
2020-01-31 14:19:07 +01:00
|
|
|
# install perl, required for OpenMP
|
2020-02-04 16:46:47 +01:00
|
|
|
# RUN choco install -y strawberryperl
|
2020-01-31 14:19:07 +01:00
|
|
|
RUN pip install psutil
|
2019-11-26 17:10:30 +01:00
|
|
|
|
|
|
|
# configure Python encoding
|
|
|
|
ENV PYTHONIOENCODING=UTF-8
|
|
|
|
|
|
|
|
# update the path variable
|
2019-12-20 09:21:46 +01:00
|
|
|
RUN powershell -NoProfile -InputFormat None -Command `
|
2020-02-04 09:58:35 +01:00
|
|
|
$path = $env:path + ';c:\Program Files (x86)\GnuWin32\bin;C:\Program Files\CMake\bin'; `
|
2019-12-20 09:21:46 +01:00
|
|
|
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path
|
2019-11-26 17:10:30 +01:00
|
|
|
|
|
|
|
# use this folder to store the worksapce'
|
2019-11-27 11:53:19 +01:00
|
|
|
VOLUME C:\ws
|
|
|
|
WORKDIR C:\ws
|
2019-11-26 17:10:30 +01:00
|
|
|
|
|
|
|
# support long file names during git checkout
|
|
|
|
RUN git config --system core.longpaths true & `
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
|
|
|
|
# Start developer command prompt with any other commands specified.
|
|
|
|
#ENTRYPOINT "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\VsDevCmd.bat" &
|
|
|
|
CMD cmd
|