This repository has been archived by the owner on Aug 29, 2022. It is now read-only.
forked from Astrabit-ST/ModShot-Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-windows
29 lines (23 loc) · 1.69 KB
/
Dockerfile-windows
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
# escape=`
# fine, windows, have your backslashes
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
# install vs community (not vs buildtools because we need devenv to upgrade vs solutions
ADD https://aka.ms/vs/16/release/vs_community.exe /vs_community.exe
RUN C:\vs_community.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --add Microsoft.VisualStudio.Workload.C++
# install chocolatey and use it to install cmake, git, conan, vim (vim for xxd only, since installing cygwin breaks docker)
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); `
choco install -y cmake git conan vim;
# configure path (add xxd and cmake), conan remotes, and fix windows path size limits for conan
RUN [Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\Program Files\CMake\bin;C:\tools\vim\vim82', 'Machine'); `
conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza; `
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan; `
conan remote add astrabit https://rkevin.jfrog.io/artifactory/api/conan/astrabit; `
conan config set general.revisions_enabled=1; `
conan profile new default --detect; `
setx CONAN_USE_ALWAYS_SHORT_PATHS 1;
# prebuild all dependencies using the conanfile in this commit
COPY conanfile.py C:/Temp/install_deps/
RUN conan install --build=missing C:\Temp\install_deps -s compiler.cppstd=20 -s compiler.runtime=static
# finally, we build oneshot when we run the container
ENTRYPOINT ["C:\\work\\src\\build-entrypoint-windows.bat"]