Skip to content

Commit c75b70f

Browse files
committed
feat: Changed image build to use bundler
1 parent 94a3679 commit c75b70f

File tree

8 files changed

+308
-29
lines changed

8 files changed

+308
-29
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
*
33

44
# Allow files and directories
5+
!Gemfile
6+
!Gemfile.lock
57
!fluent.conf
68
!fluent.yaml
79
!entrypoint.sh

.github/dependabot.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ updates:
66
interval: daily
77
assignees:
88
- stevehipwell
9+
- package-ecosystem: docker
10+
directory: /
11+
schedule:
12+
interval: daily
13+
assignees:
14+
- stevehipwell
15+
- package-ecosystem: bundler
16+
directory: /
17+
schedule:
18+
interval: daily
19+
assignees:
20+
- stevehipwell

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Deprecated
1818
- Removed -->
1919

20+
## [v2.1.0] - 2022-10-25
21+
22+
### All Changes
23+
24+
- Changed to use explicit base image version and Dependabot to manage the updates.
25+
- Changed to use Bundler to install the Gems and Dependabot to manage the updates.
26+
- Changed default label in configuration to `@DEFAULT` as idiomatically it should be uppercase.
27+
2028
## [v2.0.0] - 2022-09-15
2129

2230
> **Warning**

Dockerfile

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM alpine:3.16
1+
FROM alpine:3.16.2
2+
3+
ENV FLUENTD_DISABLE_BUNDLER_INJECTION="1"
4+
COPY Gemfile Gemfile.lock /fluentd/
25

36
# Do not split this into multiple RUN!
47
# Docker creates a layer for every RUN-Statement
@@ -13,27 +16,10 @@ RUN apk update \
1316
build-base linux-headers \
1417
ruby-dev gnupg \
1518
&& echo 'gem: --no-document' >> /etc/gemrc \
16-
&& gem install oj -v 3.13.19 \
17-
&& gem install json -v 2.6.2 \
18-
&& gem install async -v 1.30.3 \
19-
&& gem install async-http -v 0.56.6 \
20-
&& gem install fluentd -v 1.15.2 \
21-
&& gem install bigdecimal -v 1.4.4 \
22-
&& gem install fluent-plugin-azure-loganalytics -v 0.7.0 \
23-
&& gem install fluent-plugin-azurestorage-gen2 -v 0.3.3 \
24-
&& gem install fluent-plugin-cloudwatch-logs -v 0.14.3 \
25-
&& gem install fluent-plugin-concat -v 2.5.0 \
26-
&& gem install fluent-plugin-datadog -v 0.14.2 \
27-
&& gem install fluent-plugin-elasticsearch -v 5.2.3 \
28-
&& gem install fluent-plugin-grafana-loki -v 1.2.18 \
29-
&& gem install fluent-plugin-kafka -v 0.18.1 \
30-
&& gem install fluent-plugin-opensearch -v 1.0.8 \
31-
&& gem install fluent-plugin-prometheus -v 2.0.3 \
32-
&& gem install fluent-plugin-record-modifier -v 2.1.1 \
33-
&& gem install fluent-plugin-rewrite-tag-filter -v 2.4.0 \
34-
&& gem install fluent-plugin-route -v 1.0.0 \
35-
&& gem install fluent-plugin-s3 -v 1.7.1 \
36-
&& gem install fluent-plugin-sqs -v 3.0.0 \
19+
&& gem install bundler --version 2.3.7 \
20+
&& bundle config silence_root_warning true \
21+
&& bundle install --gemfile=/fluentd/Gemfile \
22+
&& gem sources --clear-all \
3723
&& apk del .build-deps \
3824
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
3925

@@ -43,7 +29,7 @@ RUN addgroup --system --gid 2000 fluent && adduser --system --ingroup fluent --u
4329
&& mkdir -p /fluentd/state \
4430
# configuration/plugins path (default: copied from .)
4531
&& mkdir -p /fluentd/etc /fluentd/plugins \
46-
&& chown -R fluent /fluentd && chgrp -R fluent /fluentd
32+
&& chown -R fluent:fluent /fluentd
4733

4834
COPY fluent.yaml /fluentd/etc/
4935
COPY --chmod=755 entrypoint.sh /bin/

Gemfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
source "https://rubygems.org"
2+
3+
gem "oj", "3.13.19"
4+
gem "json", "2.6.2"
5+
gem "async", "1.30.3"
6+
gem "async-http", "0.56.6"
7+
gem "fluentd", "1.15.2"
8+
gem "fluent-plugin-azure-loganalytics", "0.7.0"
9+
gem "fluent-plugin-azurestorage-gen2", "0.3.3"
10+
gem "fluent-plugin-cloudwatch-logs", "0.14.3"
11+
gem "fluent-plugin-concat", "2.5.0"
12+
gem "fluent-plugin-datadog", "0.14.2"
13+
gem "fluent-plugin-elasticsearch", "5.2.3"
14+
gem "fluent-plugin-grafana-loki", "1.2.18"
15+
gem "fluent-plugin-kafka", "0.18.1"
16+
gem "fluent-plugin-opensearch", "1.0.8"
17+
gem "fluent-plugin-prometheus", "2.0.3"
18+
gem "fluent-plugin-record-modifier", "2.1.1"
19+
gem "fluent-plugin-rewrite-tag-filter", "2.4.0"
20+
gem "fluent-plugin-route", "1.0.0"
21+
gem "fluent-plugin-s3", "1.7.1"
22+
gem "fluent-plugin-sqs", "3.0.0"

Gemfile.lock

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
7 0% 87 1% 87 5% ÔûêÔûê 87 6% ÔûêÔûê 87 10% ÔûêÔûêÔûêÔûê 87 11% ÔûêÔûêÔûêÔûêÔûê 87 16% ÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 31% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 37% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 48% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 49% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 61% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 74% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 86% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 98% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87 99% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê 87100% ÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûê8GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
async (1.30.3)
5+
console (~> 1.10)
6+
nio4r (~> 2.3)
7+
timers (~> 4.1)
8+
async-http (0.56.6)
9+
async (>= 1.25)
10+
async-io (>= 1.28)
11+
async-pool (>= 0.2)
12+
protocol-http (~> 0.22.0)
13+
protocol-http1 (~> 0.14.0)
14+
protocol-http2 (~> 0.14.0)
15+
traces (~> 0.4.0)
16+
async-io (1.34.0)
17+
async
18+
async-pool (0.3.12)
19+
async (>= 1.25)
20+
aws-eventstream (1.2.0)
21+
aws-partitions (1.650.0)
22+
aws-sdk-cloudwatchlogs (1.53.0)
23+
aws-sdk-core (~> 3, >= 3.127.0)
24+
aws-sigv4 (~> 1.1)
25+
aws-sdk-core (3.164.0)
26+
aws-eventstream (~> 1, >= 1.0.2)
27+
aws-partitions (~> 1, >= 1.525.0)
28+
aws-sigv4 (~> 1.1)
29+
jmespath (~> 1, >= 1.6.1)
30+
aws-sdk-kms (1.58.0)
31+
aws-sdk-core (~> 3, >= 3.127.0)
32+
aws-sigv4 (~> 1.1)
33+
aws-sdk-s3 (1.116.0)
34+
aws-sdk-core (~> 3, >= 3.127.0)
35+
aws-sdk-kms (~> 1)
36+
aws-sigv4 (~> 1.4)
37+
aws-sdk-sqs (1.51.1)
38+
aws-sdk-core (~> 3, >= 3.127.0)
39+
aws-sigv4 (~> 1.1)
40+
aws-sigv4 (1.5.2)
41+
aws-eventstream (~> 1, >= 1.0.2)
42+
azure-loganalytics-datacollector-api (0.5.0)
43+
rest-client
44+
concurrent-ruby (1.1.10)
45+
connection_pool (2.3.0)
46+
console (1.16.2)
47+
fiber-local
48+
cool.io (1.7.1)
49+
digest-crc (0.6.4)
50+
rake (>= 12.0.0, < 14.0.0)
51+
domain_name (0.5.20190701)
52+
unf (>= 0.0.5, < 1.0.0)
53+
elastic-transport (8.1.0)
54+
faraday (< 3)
55+
multi_json
56+
elasticsearch (8.4.0)
57+
elastic-transport (~> 8)
58+
elasticsearch-api (= 8.4.0)
59+
elasticsearch-api (8.4.0)
60+
multi_json
61+
ethon (0.15.0)
62+
ffi (>= 1.15.0)
63+
excon (0.93.1)
64+
faraday (1.10.2)
65+
faraday-em_http (~> 1.0)
66+
faraday-em_synchrony (~> 1.0)
67+
faraday-excon (~> 1.1)
68+
faraday-httpclient (~> 1.0)
69+
faraday-multipart (~> 1.0)
70+
faraday-net_http (~> 1.0)
71+
faraday-net_http_persistent (~> 1.0)
72+
faraday-patron (~> 1.0)
73+
faraday-rack (~> 1.0)
74+
faraday-retry (~> 1.0)
75+
ruby2_keywords (>= 0.0.4)
76+
faraday-em_http (1.0.0)
77+
faraday-em_synchrony (1.0.0)
78+
faraday-excon (1.1.0)
79+
faraday-httpclient (1.0.1)
80+
faraday-multipart (1.0.4)
81+
multipart-post (~> 2)
82+
faraday-net_http (1.0.1)
83+
faraday-net_http_persistent (1.2.0)
84+
faraday-patron (1.0.0)
85+
faraday-rack (1.0.0)
86+
faraday-retry (1.0.3)
87+
faraday_middleware-aws-sigv4 (0.6.1)
88+
aws-sigv4 (~> 1.0)
89+
faraday (>= 1.8, < 2)
90+
ffi (1.15.5)
91+
fiber-local (1.0.0)
92+
fluent-config-regexp-type (1.0.0)
93+
fluentd (> 1.0.0, < 2)
94+
fluent-plugin-azure-loganalytics (0.7.0)
95+
azure-loganalytics-datacollector-api (>= 0.5.0)
96+
fluentd (>= 0.14.15, < 2)
97+
rest-client
98+
yajl-ruby
99+
fluent-plugin-azurestorage-gen2 (0.3.3)
100+
concurrent-ruby (~> 1.1, >= 1.1.5)
101+
fluentd (>= 1.0, < 2)
102+
json (~> 2.1, >= 2.1.0)
103+
typhoeus (~> 1.0, >= 1.0.1)
104+
uuidtools (~> 2.1, >= 2.1.5)
105+
yajl-ruby (~> 1.4)
106+
fluent-plugin-cloudwatch-logs (0.14.3)
107+
aws-sdk-cloudwatchlogs (~> 1.0)
108+
fluentd (>= 1.8.0)
109+
fluent-plugin-concat (2.5.0)
110+
fluentd (>= 0.14.0, < 2)
111+
fluent-plugin-datadog (0.14.2)
112+
fluentd (>= 1, < 2)
113+
net-http-persistent (~> 4.0.1)
114+
fluent-plugin-elasticsearch (5.2.3)
115+
elasticsearch
116+
excon
117+
fluentd (>= 0.14.22)
118+
fluent-plugin-grafana-loki (1.2.18)
119+
fluentd (>= 1.9.3, < 2)
120+
fluent-plugin-kafka (0.18.1)
121+
fluentd (>= 0.10.58, < 2)
122+
ltsv
123+
ruby-kafka (>= 1.4.0, < 2)
124+
fluent-plugin-opensearch (1.0.8)
125+
aws-sdk-core (~> 3)
126+
excon
127+
faraday (~> 1.10)
128+
faraday_middleware-aws-sigv4
129+
fluentd (>= 0.14.22)
130+
opensearch-ruby
131+
fluent-plugin-prometheus (2.0.3)
132+
fluentd (>= 1.9.1, < 2)
133+
prometheus-client (>= 2.1.0)
134+
fluent-plugin-record-modifier (2.1.1)
135+
fluentd (>= 1.0, < 2)
136+
fluent-plugin-rewrite-tag-filter (2.4.0)
137+
fluent-config-regexp-type
138+
fluentd (>= 0.14.2, < 2)
139+
fluent-plugin-route (1.0.0)
140+
fluentd (>= 0.14.0)
141+
fluent-plugin-s3 (1.7.1)
142+
aws-sdk-s3 (~> 1.60)
143+
aws-sdk-sqs (~> 1.23)
144+
fluentd (>= 0.14.22, < 2)
145+
fluent-plugin-sqs (3.0.0)
146+
aws-sdk-sqs (~> 1)
147+
fluentd (>= 0.12.0, < 2)
148+
yajl-ruby (~> 1.0)
149+
fluentd (1.15.2)
150+
bundler
151+
cool.io (>= 1.4.5, < 2.0.0)
152+
http_parser.rb (>= 0.5.1, < 0.9.0)
153+
msgpack (>= 1.3.1, < 2.0.0)
154+
serverengine (>= 2.3.0, < 3.0.0)
155+
sigdump (~> 0.2.2)
156+
strptime (>= 0.2.4, < 1.0.0)
157+
tzinfo (>= 1.0, < 3.0)
158+
tzinfo-data (~> 1.0)
159+
webrick (>= 1.4.2, < 1.8.0)
160+
yajl-ruby (~> 1.0)
161+
http-accept (1.7.0)
162+
http-cookie (1.0.5)
163+
domain_name (~> 0.5)
164+
http_parser.rb (0.8.0)
165+
jmespath (1.6.1)
166+
json (2.6.2)
167+
ltsv (0.1.2)
168+
mime-types (3.4.1)
169+
mime-types-data (~> 3.2015)
170+
mime-types-data (3.2022.0105)
171+
msgpack (1.6.0)
172+
multi_json (1.15.0)
173+
multipart-post (2.2.3)
174+
net-http-persistent (4.0.1)
175+
connection_pool (~> 2.2)
176+
netrc (0.11.0)
177+
nio4r (2.5.8)
178+
oj (3.13.19)
179+
opensearch-api (2.0.2)
180+
multi_json
181+
opensearch-ruby (2.0.3)
182+
opensearch-api (= 2.0.2)
183+
opensearch-transport (~> 2.0.0)
184+
opensearch-transport (2.0.1)
185+
faraday (>= 1.0, < 3)
186+
multi_json
187+
prometheus-client (4.0.0)
188+
protocol-hpack (1.4.2)
189+
protocol-http (0.22.9)
190+
protocol-http1 (0.14.6)
191+
protocol-http (~> 0.22)
192+
protocol-http2 (0.14.2)
193+
protocol-hpack (~> 1.4)
194+
protocol-http (~> 0.18)
195+
rake (13.0.6)
196+
rest-client (2.1.0)
197+
http-accept (>= 1.7.0, < 2.0)
198+
http-cookie (>= 1.0.2, < 2.0)
199+
mime-types (>= 1.16, < 4.0)
200+
netrc (~> 0.8)
201+
ruby-kafka (1.5.0)
202+
digest-crc
203+
ruby2_keywords (0.0.5)
204+
serverengine (2.3.0)
205+
sigdump (~> 0.2.2)
206+
sigdump (0.2.4)
207+
strptime (0.2.5)
208+
timers (4.3.5)
209+
traces (0.4.1)
210+
typhoeus (1.4.0)
211+
ethon (>= 0.9.0)
212+
tzinfo (2.0.5)
213+
concurrent-ruby (~> 1.0)
214+
tzinfo-data (1.2022.5)
215+
tzinfo (>= 1.0.0)
216+
unf (0.1.4)
217+
unf_ext
218+
unf_ext (0.0.8.2)
219+
uuidtools (2.2.0)
220+
webrick (1.7.0)
221+
yajl-ruby (1.4.3)
222+
223+
PLATFORMS
224+
ruby
225+
226+
DEPENDENCIES
227+
async (= 1.30.3)
228+
async-http (= 0.56.6)
229+
fluent-plugin-azure-loganalytics (= 0.7.0)
230+
fluent-plugin-azurestorage-gen2 (= 0.3.3)
231+
fluent-plugin-cloudwatch-logs (= 0.14.3)
232+
fluent-plugin-concat (= 2.5.0)
233+
fluent-plugin-datadog (= 0.14.2)
234+
fluent-plugin-elasticsearch (= 5.2.3)
235+
fluent-plugin-grafana-loki (= 1.2.18)
236+
fluent-plugin-kafka (= 0.18.1)
237+
fluent-plugin-opensearch (= 1.0.8)
238+
fluent-plugin-prometheus (= 2.0.3)
239+
fluent-plugin-record-modifier (= 2.1.1)
240+
fluent-plugin-rewrite-tag-filter (= 2.4.0)
241+
fluent-plugin-route (= 1.0.0)
242+
fluent-plugin-s3 (= 1.7.1)
243+
fluent-plugin-sqs (= 3.0.0)
244+
fluentd (= 1.15.2)
245+
json (= 2.6.2)
246+
oj (= 3.13.19)
247+
248+
BUNDLED WITH
249+
2.3.7

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ As of `v2.0.0` this image will follow [semantic versioning](https://semver.org/)
1919

2020
### Plugins
2121

22-
The following plugins have been added to the base image, to see the specific version please look in the _Dockerfile_.
22+
The following plugins have been added to the base image, to see the specific version please look in the [Gemfile](./Gemfile).
2323

2424
- [fluent-plugin-azure-loganalytics](https://github.com/yokawasa/fluent-plugin-azure-loganalytics)
2525
- [fluent-plugin-azurestorage-gen2](https://github.com/oleewere/fluent-plugin-azurestorage-gen2)

fluent.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ system:
44
config:
55
- source:
66
$type: forward
7-
$label: '@default'
7+
$label: "@DEFAULT"
88
port: 24224
99
bind: 0.0.0.0
1010

1111
- label:
12-
$name: '@FLUENT_LOG'
12+
$name: "@FLUENT_LOG"
1313
config:
1414
- match:
15-
$tag: 'fluent.*'
15+
$tag: "fluent.*"
1616
$type: stdout
1717

1818
- label:
19-
$name: '@default'
19+
$name: "@DEFAULT"
2020
config:
2121
- match:
22-
$tag: '**'
22+
$tag: "**"
2323
$type: stdout

0 commit comments

Comments
 (0)