-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile.windows.x86_64
39 lines (29 loc) · 1.35 KB
/
Dockerfile.windows.x86_64
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
30
31
32
33
34
35
36
37
38
39
# escape=`
ARG WIN_VER="ltsc2019"
ARG GIT_COMMIT
ARG GIT_BRANCH
ARG RUST_TOOLCHAIN
FROM mcr.microsoft.com/windows/servercore:$WIN_VER
ENV chocolateyUseWindowsCompression "true"
ENV RUST_TOOLCHAIN="1.46.0"
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
ADD https://win.rustup.rs/x86_64 C:\TEMP\rustup-init.exe
ADD https://chocolatey.org/install.ps1 C:\TEMP\choco-install.ps1
# Let's be explicit about the shell that we're going to use.
SHELL ["cmd", "/S", "/C"]
# Install Build Tools. A 3010 error signals that requested operation is
# successfull but changes will not be effective until the system is rebooted.
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath C:\BuildTools `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Workload.MSBuildTools `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Component.Windows10SDK.17763 `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
RUN powershell C:\TEMP\choco-install.ps1
RUN powershell C:\TEMP\rustup-init.exe -y --default-toolchain $env:RUST_TOOLCHAIN
RUN rustup component add rustfmt
RUN rustup component add clippy
RUN choco install git -y
RUN rmdir /s /q c:\TEMP
RUN echo "{\"rev\":\"$GIT_COMMIT\",\"branch\":\"${GIT_BRANCH}\",\"cargo-params\":\"${CARGO_PARAMS}\" }" > /buildinfo.json