-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0d6cc73
Showing
5 changed files
with
139 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,51 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 1 * * 0" | ||
|
||
jobs: | ||
ltsc2022: | ||
strategy: | ||
matrix: | ||
VS_VER: ["2022", "2019", "2017"] | ||
runs-on: windows-2022 | ||
env: | ||
WIN_VER: ltsc2022 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: build | ||
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/visualstudio${{ matrix.VS_VER }}-workload-vctools -t ${{ secrets.DOCKERHUB_USERNAME }}/visualstudio${{ matrix.VS_VER }}-workload-vctools:${{ env.WIN_VER }} --build-arg WIN_VER=${{ env.WIN_VER }} --build-arg VS_VER=${{ matrix.VS_VER }} . | ||
- name: push | ||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/visualstudio${{ matrix.VS_VER }}-workload-vctools --all-tags | ||
|
||
ltsc2019: | ||
strategy: | ||
matrix: | ||
VS_VER: ["2022", "2019", "2017"] | ||
runs-on: windows-2019 | ||
env: | ||
WIN_VER: ltsc2019 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: build | ||
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/visualstudio${{ matrix.VS_VER }}-workload-vctools:${{ env.WIN_VER }} --build-arg WIN_VER=${{ env.WIN_VER }} --build-arg VS_VER=${{ matrix.VS_VER }} . | ||
- name: push | ||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/visualstudio${{ matrix.VS_VER }}-workload-vctools --all-tags |
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,9 @@ | ||
ARG WIN_VER=ltsc2022 | ||
|
||
ARG VS_VER=2022 | ||
|
||
FROM amitie10g/visualstudio${VS_VER}buildtools:${WIN_VER} | ||
ARG VS_VER | ||
|
||
SHELL ["powershell", "-Command"] | ||
RUN choco install -y visualstudio${env:VS_VER}-workload-vctools; choco-cleaner |
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,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org> |
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,21 @@ | ||
# Visual C++ build tools workload for Visual Studio Build Tools | ||
This container brings Visual C++ build tools workload for Visual Studio Build Tools (2022, 2019 and 2017) in a Docker container using the [.NET Framework runtime](https://hub.docker.com/_/microsoft-dotnet-framework-runtime/) 4.8 (on Windows Server Core ltsc2022 and ltsc2019) base image, plus [Chocolatey](https://chocolatey.org/). | ||
|
||
# Container images available at Docker Hub | ||
* [``amitie10g/visualstudio2022-workload-vctools``](https://hub.docker.com/r/amitie10g/visualstudio2022-workload-vctools) | ||
* [``amitie10g/visualstudio2019-workload-vctools``](https://hub.docker.com/r/amitie10g/visualstudio2019-workload-vctools) | ||
* [``amitie10g/visualstudio2019-workload-vctools``](https://hub.docker.com/r/amitie10g/visualstudio2017-workload-vctools) | ||
|
||
## Tags: | ||
* ``ltsc2022`` ``latest`` | ||
* ``ltsc2019`` | ||
|
||
# Building | ||
* GitHub Actions workflow is provided for automated builds onto Server Core 2022 and 2019. | ||
* ``build.ps1`` Powershell script is provided for building different versions as your needs. | ||
|
||
# Licensing | ||
* The contents on this repo are released into the Public domain (**The Unlicense**) | ||
* Chocolatey is licensed under the **[Apache License](https://github.com/chocolatey/choco/blob/master/LICENSE)** | ||
* Micriosoft Windows Container images usage is subjected to the **[Microsoft EULA](https://learn.microsoft.com/virtualization/windowscontainers/images-eula)** | ||
* Visual Studio Build Tools usage is subjected to the **[Microsoft EULA](https://visualstudio.microsoft.com/license-terms/vs2022-ga-diagnosticbuildtools/)** |
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,34 @@ | ||
#escape=` | ||
$DockerUser="amitie10g" | ||
|
||
# Visual Studio version | ||
$VisualStudioVersions = @( | ||
"2022", | ||
"2019", | ||
"2017" | ||
) | ||
|
||
# Windows version | ||
$WindowsVersions = @( | ||
"ltsc2022", | ||
"ltsc2019" | ||
) | ||
|
||
# Build each version available | ||
foreach (${VSVer} in ${VisualStudioVersions}) { | ||
docker build ` | ||
-t ${DockerUser}/visualstudio${VSVer}-workload-vctools ` | ||
--build-arg VS_VER=${VSVer} ` | ||
--isolation=hyperv ` | ||
. | ||
foreach (${WinVer} in ${WindowsVersions}) { | ||
docker build ` | ||
-t ${DockerUser}/visualstudio${VSVer}-workload-vctools:${WinVer} ` | ||
--build-arg WIN_VER=${WinVer} ` | ||
--build-arg VS_VER=${VSVer} ` | ||
--isolation=hyperv ` | ||
. | ||
} | ||
|
||
docker push ${DockerUser}/visualstudio${VSVer}-workload-vctools --all-tags | ||
} |