Skip to content

Commit bc966ed

Browse files
cosmo0920edsiper
authored andcommitted
dockerfiles: Install minimum components and avoiding to use includeRecommended
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 223a566 commit bc966ed

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

dockerfiles/Dockerfile.windows

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,18 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
4141
Invoke-WebRequest -OutFile \"${msvs_build_tools_dist}\" \"${msvs_build_tools_dist_url}\"; `
4242
Invoke-WebRequest -OutFile \"${msvs_build_tools_channel}\" \"${msvs_build_tools_channel_url}\"; `
4343
Write-Host \"Installing Visual Studio Build Tools into ${env:MSVS_HOME}...\"; `
44-
Start-Process \"${msvs_build_tools_dist}\" `
44+
$p = Start-Process \"${msvs_build_tools_dist}\" `
4545
-ArgumentList '--quiet ', '--wait ', '--norestart ', '--nocache', `
4646
\"--installPath ${env:MSVS_HOME}\", `
4747
\"--channelUri ${msvs_build_tools_channel}\", `
4848
\"--installChannelUri ${msvs_build_tools_channel}\", `
4949
'--add Microsoft.VisualStudio.Workload.VCTools', `
50-
'--includeRecommended' -NoNewWindow -Wait; `
50+
'--add Microsoft.VisualStudio.Workload.MSBuildTools', `
51+
'--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64', `
52+
'--add Microsoft.VisualStudio.Component.VC.CoreBuildTools', `
53+
'--add Microsoft.VisualStudio.Component.VC.MSVC.143', `
54+
'--add Microsoft.VisualStudio.Component.Windows10SDK.19041' `
55+
-NoNewWindow -Wait; `
5156
Remove-Item -Force \"${msvs_build_tools_dist}\"; `
5257
Remove-Item -Path \"${msvs_build_tools_channel}\" -Force;
5358

@@ -142,7 +147,8 @@ RUN $vcpkg_dist_base_name=\"vcpkg-${env:VCPKG_VERSION}\"; `
142147

143148
# Ensure we only attempt to build release and static linking
144149
ENV VCPKG_BUILD_TYPE=release `
145-
VCPKG_LIBRARY_LINKAGE=static
150+
VCPKG_LIBRARY_LINKAGE=static `
151+
VCPKG_VISUAL_STUDIO_PATH="C:\BuildTools"
146152

147153
# Install dependencies and clean temporary files to save space
148154
RUN vcpkg install --recurse openssl --triplet x64-windows-static; `

0 commit comments

Comments
 (0)