Skip to content

Instantly share code, notes, and snippets.

@kazuki0824
Last active August 19, 2023 18:27
Show Gist options
  • Save kazuki0824/18be5a49ac4a9b72a0632752e5ffe561 to your computer and use it in GitHub Desktop.
Save kazuki0824/18be5a49ac4a9b72a0632752e5ffe561 to your computer and use it in GitHub Desktop.
WindowsでRustのビルドを行う(msvc, gnu両対応?)
ARG IMAGE=mcr.microsoft.com/dotnet/framework/runtime:4.8.1
FROM ${IMAGE}
SHELL ["powershell", "-command"]
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointsManager]::ServerCertificationCallback = {$true}; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
RUN choco install cmake -y --installargs 'ADD_CMAKE_TO_PATH=System'
RUN choco install mingw visualstudio2022buildtools -y
RUN choco install rustup.install llvm -y
RUN rustup default stable-gnu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment