-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stefan Scherer <[email protected]>
- Loading branch information
1 parent
921f802
commit d72b8d8
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM microsoft/windowsservercore | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] | ||
|
||
RUN (New-Object System.Net.WebClient).DownloadFile('http://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe', 'visualcppbuildtools_full.exe') ; \ | ||
Start-Process .\visualcppbuildtools_full.exe -ArgumentList '/NoRestart /S' -Wait ; \ | ||
rm visualcppbuildtools_full.exe | ||
|
||
COPY entrypoint.bat entrypoint.bat | ||
|
||
SHELL ["cmd"] | ||
|
||
WORKDIR /code | ||
|
||
ENTRYPOINT ["C:\\entrypoint.bat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# msbuild | ||
|
||
Build a Docker image with Visual C++ Build tools. | ||
The `entrypoint.bat` script calls the `vcbuildtools.bat` script to set all | ||
environment variables. | ||
|
||
## Build image | ||
|
||
``` | ||
docker build -t msbuild . | ||
``` | ||
|
||
## Use the image | ||
|
||
``` | ||
docker run -v "$(pwd):C:\code" msbuild msbuild yourproject.sln /p:Configuration=Release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
pushd C: | ||
call "C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat" | ||
popd | ||
%* |