simplified vs_config

master
JoYo 2023-03-27 14:19:35 -04:00
parent 27c5c52efe
commit 5ab3d021bc
5 changed files with 18 additions and 33 deletions

View File

@ -3,14 +3,17 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
ADD https://aka.ms/vs/17/release/channel C:\docker\visualstudio.release.chman ADD https://aka.ms/vs/17/release/channel C:\docker\visualstudio.release.chman
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\docker\vs_buildtools.exe ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\docker\vs_buildtools.exe
COPY vs17.config C:\docker\.vsconfig
RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache ` RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\docker\visualstudio.release.chman ` --channelUri C:\docker\visualstudio.release.chman `
--installChannelUri C:\docker\visualstudio.release.chman ` --installChannelUri C:\docker\visualstudio.release.chman `
--config "C:\docker\.vsconfig" ` --add Microsoft.VisualStudio.Workload.VCTools `
--includeRecommended `
--installPath C:\msvc --installPath C:\msvc
RUN setx path "%path%;C:\msvc\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
RUN setx path "%path%;C:\msvc\MSBuild\Current\Bin"
VOLUME C:\source\ VOLUME C:\source\
WORKDIR C:\source\ WORKDIR C:\source\
ENTRYPOINT ["powershell", "-NoExit", "-Command", "Import-Module C:\\msvc\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll;", "Enter-VsDevShell -VsInstallPath C:\\msvc\\ -DevCmdArguments -arch=amd64;"] ENTRYPOINT ["powershell", "-NoExit", "-Command", "Import-Module C:\\msvc\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll;", "Enter-VsDevShell -VsInstallPath C:\\msvc\\ -DevCmdArguments -arch=amd64;"]

View File

@ -119,3 +119,10 @@ Use the following command to disable.
``` ```
docker-compose disable-v2 docker-compose disable-v2
``` ```
# service immediately exits on `docker-compose up`
Reminder to run the container instead:
```
docker-compose run win_build
```

View File

@ -1,13 +0,0 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.VCTools",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.ATLMFC",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.Windows10SDK.17763",
"Microsoft.VisualStudio.Component.Windows81SDK"
]
}

View File

@ -1,16 +0,0 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.VCTools",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang",
"Microsoft.Component.VC.Runtime.UCRTSDK",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.ATLMFC",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.VC.Llvm.Clang",
"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK",
]
}

View File

@ -3,14 +3,18 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
ADD https://aka.ms/vs/15/release/channel C:\docker\visualstudio.release.chman ADD https://aka.ms/vs/15/release/channel C:\docker\visualstudio.release.chman
ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\docker\vs_buildtools.exe ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\docker\vs_buildtools.exe
COPY vs15.config C:\docker\.vsconfig
RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache ` RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\docker\visualstudio.release.chman ` --channelUri C:\docker\visualstudio.release.chman `
--installChannelUri C:\docker\visualstudio.release.chman ` --installChannelUri C:\docker\visualstudio.release.chman `
--config "C:\docker\.vsconfig" ` --add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP `
--includeRecommended `
--installPath C:\msvc --installPath C:\msvc
RUN setx path "%path%;C:\msvc\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
RUN setx path "%path%;C:\msvc\MSBuild\15.0\Bin"
VOLUME C:\source\ VOLUME C:\source\
WORKDIR C:\source\ WORKDIR C:\source\
ENTRYPOINT ["cmd", "/k C:\\msvc\\Common7\\Tools\\VsDevCmd.bat"] ENTRYPOINT ["cmd", "/k C:\\msvc\\Common7\\Tools\\VsDevCmd.bat"]