Skip to content

Commit c1a0b3d

Browse files
committed
dockerfile: removed unused DLLs from image for Windows Containers.
Signed-off-by: Marat Abrarov <[email protected]>
1 parent 50f64e7 commit c1a0b3d

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

dockerfiles/Dockerfile.windows

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ RUN $msvs_build_tools_dist_name=\"vs_buildtools.exe\"; `
4444
'--includeRecommended' -NoNewWindow -Wait; `
4545
Remove-Item -Force \"${msvs_build_tools_dist}\";
4646

47-
ENV MSVC_RUNTIME_VERSION="15" `
48-
MSVC_RUNTIME_DOWNLOAD_URL="https://aka.ms/vs"
49-
RUN $msvc_runtime_dist_name=\"vc_redist.x64.exe\"; `
50-
$msvc_runtime_dist=\"${env:TMP}\${msvc_runtime_dist_name}\"; `
51-
$msvc_runtime_url=\"${env:MSVC_RUNTIME_DOWNLOAD_URL}/${env:MSVC_RUNTIME_VERSION}/release/${msvc_runtime_dist_name}\"; `
52-
Write-Host \"Downloading Microsoft Visual C++ Redistributable...\"; `
53-
Write-Host \"${msvc_runtime_url} -> ${msvc_runtime_dist}\"; `
54-
Invoke-WebRequest -OutFile \"${msvc_runtime_dist}\" \"${msvc_runtime_url}\"; `
55-
Write-Host \"Installing Microsoft Visual C++ runtime libraries...\"; `
56-
Start-Process \"${msvc_runtime_dist}\" -ArgumentList '/install', '/quiet', '/norestart' -NoNewWindow -Wait; `
57-
Remove-Item -Force \"${msvc_runtime_dist}\";
58-
5947
ENV CMAKE_HOME="C:\cmake" `
6048
CMAKE_VERSION="3.31.6" `
6149
CMAKE_URL="https://github.com/Kitware/CMake/releases/download"
@@ -152,12 +140,6 @@ ENV VCPKG_BUILD_TYPE=release `
152140
RUN vcpkg install --recurse openssl --triplet x64-windows-static; `
153141
vcpkg install --recurse libyaml --triplet x64-windows-static;
154142

155-
# Technique from https://github.com/StefanScherer/dockerfiles-windows/blob/master/mongo/3.6/Dockerfile
156-
WORKDIR /fluent-bit/bin
157-
RUN Copy-Item -Path C:\Windows\System32\msvcp140.dll -Destination /fluent-bit/bin/; `
158-
Copy-Item -Path C:\Windows\System32\vccorlib140.dll -Destination /fluent-bit/bin/; `
159-
Copy-Item -Path C:\Windows\System32\vcruntime140.dll -Destination /fluent-bit/bin/;
160-
161143
FROM builder-base AS builder
162144

163145
# Build Fluent Bit from source - context must be the root of the Git repo
@@ -180,6 +162,7 @@ RUN call "%MSVS_HOME%\VC\Auxiliary\Build\vcvars64.bat" && `
180162

181163
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
182164

165+
WORKDIR /fluent-bit/bin
183166
# Set up config files and binaries in single /fluent-bit hierarchy for easy copy in later stage
184167
RUN New-Item -Path /fluent-bit/etc/ -ItemType "directory"; `
185168
Copy-Item -Path /src/conf/fluent-bit-win32.conf /fluent-bit/etc/fluent-bit.conf; `

0 commit comments

Comments
 (0)