Skip to content

Commit 22fa55e

Browse files
committed
dockerfile: building with NMake in image for Windows Containers.
Signed-off-by: Marat Abrarov <[email protected]>
1 parent b04fa58 commit 22fa55e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dockerfiles/Dockerfile.windows

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,20 @@ WORKDIR /src/build
164164
COPY . /src/
165165

166166
ARG BUILD_PARALLEL=1
167-
RUN cmake -G "'Visual Studio 16 2019'" `
167+
SHELL ["cmd", "/S", "/C"]
168+
RUN call "%MSVS_HOME%\VC\Auxiliary\Build\vcvars64.bat" && `
169+
cmake -G "NMake Makefiles" `
168170
-DOPENSSL_ROOT_DIR='C:\dev\vcpkg\packages\openssl_x64-windows-static' `
169171
-DFLB_LIBYAML_DIR='C:\dev\vcpkg\packages\libyaml_x64-windows-static' `
170172
-DCMAKE_BUILD_TYPE=Release `
171173
-DFLB_SHARED_LIB=Off `
172174
-DFLB_EXAMPLES=Off `
173175
-DFLB_DEBUG=Off `
174176
-DFLB_RELEASE=On `
175-
../;`
176-
cmake --build . --config Release -j ${BUILD_PARALLEL};
177+
..\ && `
178+
cmake --build . --config Release -j "%BUILD_PARALLEL%"
179+
180+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
177181

178182
# Set up config files and binaries in single /fluent-bit hierarchy for easy copy in later stage
179183
RUN New-Item -Path /fluent-bit/etc/ -ItemType "directory"; `
@@ -185,7 +189,7 @@ RUN New-Item -Path /fluent-bit/etc/ -ItemType "directory"; `
185189
Copy-Item -Path /src/conf/parsers_openstack.conf /fluent-bit/etc/; `
186190
Copy-Item -Path /src/conf/parsers_cinder.conf /fluent-bit/etc/; `
187191
Copy-Item -Path /src/conf/plugins.conf /fluent-bit/etc/; `
188-
Copy-Item -Path /src/build/bin/Release/fluent-bit.exe /fluent-bit/bin/;
192+
Copy-Item -Path /src/build/bin/fluent-bit.exe /fluent-bit/bin/;
189193

190194
#
191195
# Runtime Image - Windows Server Core

0 commit comments

Comments
 (0)