Skip to content

Commit

Permalink
Changed base Windows image for build
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneft committed Nov 13, 2021
1 parent b625d8c commit 7310cb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/images_build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
echo "docker build --file=$dockerfile $tags $context"
docker build --label org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} `
--label org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} `
--build-arg=BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-${{ steps.base_os_tag.outputs.os_tag }} `
--build-arg=BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:${{ steps.base_os_tag.outputs.os_tag }} `
--file=$dockerfile `
$tags `
$context
Expand Down
7 changes: 5 additions & 2 deletions Dockerfiles/build-base/windows/Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# escape=`
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM $BUILD_BASE_IMAGE

ARG PCRE_VERSION=8.45
Expand Down Expand Up @@ -118,8 +118,11 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--quiet `
--wait `
--norestart `
--nocache modify `
--nocache `
--installPath """${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools""" `
--channelUri https://aka.ms/vs/16/release/channel `
--installChannelUri https://aka.ms/vs/16/release/channel `
--channelId VisualStudio.16.Release `
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project; `
Expand Down
11 changes: 7 additions & 4 deletions Dockerfiles/build-base/windows/Dockerfile.agent2
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
# escape=`
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
FROM $BUILD_BASE_IMAGE as builder_base

ARG PCRE_VERSION=8.45
ARG OPENSSL_VERSION=1.1.1l
ARG ZLIB_VERSION=1.2.11
ARG GOLANG_VERSION=1.17.2
ARG GOLANG_VERSION=1.17.3
ARG SEVEN_ZIP_VERSION=1900
ARG BUILD_ARCH=x64
ARG CPU_MODEL=AMD64
Expand Down Expand Up @@ -67,7 +67,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest -OutFile $env:SystemDrive\go-amd64.msi -Uri $env:GOLANG_URL; `
$sha256 = 'f7d54883e9bb653b1a50061a7fa42a6503c680a25cee32f16ccba51a77b0c83b'; `
$sha256 = 'bf3c475726c9165eb5d809e1bb4ce33550a25850495aac0a5df6d0df05930936'; `
`
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ((Get-FileHash $env:SystemDrive\go-amd64.msi -Algorithm sha256).Hash -ne $sha256) { `
Expand Down Expand Up @@ -141,8 +141,11 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--quiet `
--wait `
--norestart `
--nocache modify `
--nocache `
--installPath """${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools""" `
--channelUri https://aka.ms/vs/16/release/channel `
--installChannelUri https://aka.ms/vs/16/release/channel `
--channelId VisualStudio.16.Release `
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project; `
Expand Down

0 comments on commit 7310cb0

Please sign in to comment.