Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

Commit aaab9a3

Browse files
authored
Merge pull request #27 from loganhz/fix4
Fix Windows Build and add multi-format for Windows image
2 parents 59d6b3f + a4b6ed6 commit aaab9a3

3 files changed

Lines changed: 58 additions & 43 deletions

File tree

package/windows/Dockerfile

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@ ARG SERVERCORE_VERSION
22

33
FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION}
44

5-
RUN powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; \
6-
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
5+
SHELL ["powershell", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
6+
7+
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
8+
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
9+
10+
RUN choco install -y ruby --version 2.4.2.2 --params "'/InstallDir:C:\'"; \
11+
choco install -y msys2 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby24\msys64'"
712

813
COPY Gemfile 'C:\fluentd\install\Gemfile'
914
COPY Gemfile.lock 'C:\fluentd\install\Gemfile.lock'
10-
COPY upgrade-gems.ps1 'C:\fluentd\install\upgrade-gems.ps1'
1115

12-
COPY fluent.conf 'C:\etc\fluent\fluent.conf'
16+
RUN refreshenv; \
17+
ridk install 2 3; \
18+
'gem: --no-document' | Out-File -Encoding UTF8 -NoNewline -Force -FilePath 'C:\ProgramData\gemrc'; \
19+
gem install bundler; \
20+
bundle config build.certstore_c --with-cflags="-Wno-attributes"; \
21+
bundle config build.yajl-ruby --with-cflags="-Wno-attributes"; \
22+
bundle config build.oj --with-cflags="-Wno-attributes"; \
23+
bundle install --gemfile='C:\fluentd\install\Gemfile'; \
24+
gem sources --clear-all; \
25+
Remove-Item -Force C:\ruby24\lib\ruby\gems\2.4.0\cache\*.gem; \
26+
Remove-Item -Recurse -Force C:\ProgramData\chocolatey
1327

14-
RUN choco install -y ruby --version 2.4.2.2 --params "'/InstallDir:C:\'" \
15-
&& choco install -y msys2 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby24\msys64'" \
16-
&& refreshenv \
17-
&& ridk install 2 3 \
18-
&& echo gem: --no-document >> C:\ProgramData\gemrc \
19-
&& gem install bundle -v 0.0.1 \
20-
&& bundle install --gemfile='C:\fluentd\install\Gemfile' \
21-
&& gem sources --clear-all
22-
23-
RUN powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; \
24-
powershell -Command "del C:\ruby24\lib\ruby\gems\2.4.0\cache\*.gem; Remove-Item -Recurse -Force C:\ProgramData\chocolatey"
28+
COPY upgrade-gems.ps1 'C:\fluentd\install\upgrade-gems.ps1'
29+
COPY fluent.conf 'C:\etc\fluent\fluent.conf'
2530

2631
CMD ["powershell", "-command", "fluentd"]

package/windows/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ gem 'fluent-plugin-remote_syslog_tls'
2323
# filter plugins
2424
gem 'fluent-plugin-concat'
2525
gem 'fluent-plugin-rewrite-tag-filter'
26+
gem 'fluent-plugin-multi-format-parser'
27+

package/windows/Gemfile.lock

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,51 @@ GEM
33
specs:
44
addressable (2.7.0)
55
public_suffix (>= 2.0.2, < 5.0)
6-
certstore_c (0.1.3)
6+
certstore_c (0.1.6)
77
concurrent-ruby (1.1.5)
88
cool.io (1.5.4-x64-mingw32)
99
dig_rb (1.0.1)
1010
digest-crc (0.4.1)
1111
domain_name (0.5.20190701)
1212
unf (>= 0.0.5, < 1.0.0)
13-
elasticsearch (7.3.0)
14-
elasticsearch-api (= 7.3.0)
15-
elasticsearch-transport (= 7.3.0)
16-
elasticsearch-api (7.3.0)
13+
elasticsearch (7.4.0)
14+
elasticsearch-api (= 7.4.0)
15+
elasticsearch-transport (= 7.4.0)
16+
elasticsearch-api (7.4.0)
1717
multi_json
18-
elasticsearch-transport (7.3.0)
18+
elasticsearch-transport (7.4.0)
1919
faraday
2020
multi_json
21-
excon (0.66.0)
22-
faraday (0.15.4)
21+
excon (0.71.1)
22+
faraday (0.17.1)
2323
multipart-post (>= 1.2, < 3)
24-
ffi (1.11.1-x64-mingw32)
24+
ffi (1.11.3-x64-mingw32)
25+
ffi-compiler (1.0.1)
26+
ffi (>= 1.0.0)
27+
rake
2528
ffi-win32-extensions (1.0.3)
2629
ffi
2730
fluent-config-regexp-type (1.0.0)
2831
fluentd (> 1.0.0, < 2)
2932
fluent-plugin-concat (2.4.0)
3033
fluentd (>= 0.14.0, < 2)
31-
fluent-plugin-elasticsearch (3.5.5)
34+
fluent-plugin-elasticsearch (3.8.0)
3235
elasticsearch
3336
excon
3437
fluentd (>= 0.14.22)
35-
fluent-plugin-kafka (0.11.1)
38+
fluent-plugin-kafka (0.12.1)
3639
fluentd (>= 0.10.58, < 2)
3740
ltsv
3841
ruby-kafka (>= 0.7.8, < 0.8.0)
39-
fluent-plugin-kubernetes_metadata_filter (2.3.0)
42+
fluent-plugin-kubernetes_metadata_filter (2.4.1)
4043
fluentd (>= 0.14.0, < 2)
4144
kubeclient (< 5)
4245
lru_redux
43-
fluent-plugin-prometheus (1.6.0)
46+
fluent-plugin-multi-format-parser (1.0.0)
47+
fluentd (>= 0.14.0, < 2)
48+
fluent-plugin-prometheus (1.7.0)
4449
fluentd (>= 0.14.20, < 2)
45-
prometheus-client
50+
prometheus-client (< 0.10)
4651
fluent-plugin-remote_syslog_tls (1.0.2)
4752
fluentd
4853
remote_syslog_sender_tls (>= 1.2.5)
@@ -53,7 +58,7 @@ GEM
5358
fluentd (>= 0.12.0)
5459
httpclient
5560
json
56-
fluentd (1.7.1-x64-mingw32)
61+
fluentd (1.8.0-x64-mingw32)
5762
certstore_c (~> 0.1.2)
5863
cool.io (>= 1.4.5, < 2.0.0)
5964
dig_rb (~> 1.0.0)
@@ -62,43 +67,46 @@ GEM
6267
serverengine (>= 2.0.4, < 3.0.0)
6368
sigdump (~> 0.2.2)
6469
strptime (>= 0.2.2, < 1.0.0)
65-
tzinfo (~> 2.0)
70+
tzinfo (>= 1.0, < 3.0)
6671
tzinfo-data (~> 1.0)
6772
win32-event (~> 0.6.1)
6873
win32-ipc (~> 0.6.1)
6974
win32-service (~> 0.8.3)
7075
windows-pr (~> 1.2.5)
7176
yajl-ruby (~> 1.0)
72-
http (3.3.0)
77+
http (4.2.0)
7378
addressable (~> 2.3)
7479
http-cookie (~> 1.0)
7580
http-form_data (~> 2.0)
76-
http_parser.rb (~> 0.6.0)
81+
http-parser (~> 1.2.0)
7782
http-accept (1.7.0)
7883
http-cookie (1.0.3)
7984
domain_name (~> 0.5)
8085
http-form_data (2.1.1)
86+
http-parser (1.2.1)
87+
ffi-compiler (>= 1.0, < 2.0)
8188
http_parser.rb (0.6.0)
8289
httpclient (2.8.3)
83-
json (2.2.0)
84-
kubeclient (4.4.0)
85-
http (~> 3.0)
90+
json (2.3.0)
91+
kubeclient (4.5.0)
92+
http (>= 3.0, < 5.0)
8693
recursive-open-struct (~> 1.0, >= 1.0.4)
8794
rest-client (~> 2.0)
8895
lru_redux (1.1.0)
8996
ltsv (0.1.2)
9097
mime-types (3.3)
9198
mime-types-data (~> 3.2015)
92-
mime-types-data (3.2019.0904)
99+
mime-types-data (3.2019.1009)
93100
msgpack (1.3.1-x64-mingw32)
94-
multi_json (1.13.1)
101+
multi_json (1.14.1)
95102
multipart-post (2.1.1)
96103
netrc (0.11.0)
97-
oj (3.9.1)
104+
oj (3.10.0)
98105
prometheus-client (0.9.0)
99106
quantile (~> 0.2.1)
100107
public_suffix (4.0.1)
101108
quantile (0.2.1)
109+
rake (13.0.1)
102110
recursive-open-struct (1.1.0)
103111
remote_syslog_sender_tls (1.2.5)
104112
syslog_protocol
@@ -110,13 +118,12 @@ GEM
110118
netrc (~> 0.8)
111119
ruby-kafka (0.7.10)
112120
digest-crc
113-
serverengine (2.1.1-x64-mingw32)
121+
serverengine (2.2.0)
114122
sigdump (~> 0.2.2)
115-
windows-pr (~> 1.2.5)
116123
sigdump (0.2.4)
117124
strptime (0.2.3)
118125
syslog_protocol (0.9.2)
119-
tzinfo (2.0.0)
126+
tzinfo (2.0.1)
120127
concurrent-ruby (~> 1.0)
121128
tzinfo-data (1.2019.3)
122129
tzinfo (>= 1.0.0)
@@ -147,6 +154,7 @@ DEPENDENCIES
147154
fluent-plugin-elasticsearch
148155
fluent-plugin-kafka
149156
fluent-plugin-kubernetes_metadata_filter
157+
fluent-plugin-multi-format-parser
150158
fluent-plugin-prometheus
151159
fluent-plugin-remote_syslog_tls
152160
fluent-plugin-rewrite-tag-filter
@@ -160,4 +168,4 @@ DEPENDENCIES
160168
windows-pr
161169

162170
BUNDLED WITH
163-
2.0.2
171+
2.1.2

0 commit comments

Comments
 (0)