File tree 5 files changed +30
-5
lines changed
5 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ RUN apt-get update \
120
120
&& gem install async -v 1.32.1 \
121
121
&& gem install async-http -v 0.64.2 \
122
122
&& gem install fluentd -v <%= fluentd_ver %> \
123
+ && export GEM_DIR=$(ruby -e 'puts Gem.dir') \
124
+ && echo GEM_DIR=$GEM_DIR \
125
+ && rm -rf $GEM_DIR/cache/*.gem \
126
+ && find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
127
+ && find $GEM_DIR -name "*.so" | xargs -r strip \
123
128
<% if is_alpine %>
124
129
&& gem install bigdecimal -v 1.4.4 \
125
130
&& apk del .build-deps \
@@ -146,7 +151,7 @@ RUN apt-get update \
146
151
'*-dev' \
147
152
&& rm -rf /var/lib/apt/lists/* \
148
153
<% end %>
149
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
154
+ && rm -rf /tmp/* /var/tmp/*
150
155
151
156
<% if is_alpine %>
152
157
RUN addgroup -S fluent && adduser -S -G fluent fluent \
Original file line number Diff line number Diff line change @@ -23,10 +23,15 @@ RUN apk update \
23
23
&& gem install async -v 1.32.1 \
24
24
&& gem install async-http -v 0.64.2 \
25
25
&& gem install fluentd -v 1.17.1 \
26
+ && export GEM_DIR=$(ruby -e 'puts Gem.dir' ) \
27
+ && echo GEM_DIR=$GEM_DIR \
28
+ && rm -rf $GEM_DIR/cache/*.gem \
29
+ && find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
30
+ && find $GEM_DIR -name "*.so" | xargs -r strip \
26
31
&& gem install bigdecimal -v 1.4.4 \
27
32
&& apk del .build-deps \
28
33
&& rm -rf /var/cache/apk/* \
29
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
34
+ && rm -rf /tmp/* /var/tmp/*
30
35
31
36
RUN addgroup -S fluent && adduser -S -G fluent fluent \
32
37
# for log storage (maybe shared with host)
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ RUN apt-get update \
35
35
&& gem install async -v 1.32.1 \
36
36
&& gem install async-http -v 0.64.2 \
37
37
&& gem install fluentd -v 1.17.1 \
38
+ && export GEM_DIR=$(ruby -e 'puts Gem.dir' ) \
39
+ && echo GEM_DIR=$GEM_DIR \
40
+ && rm -rf $GEM_DIR/cache/*.gem \
41
+ && find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
42
+ && find $GEM_DIR -name "*.so" | xargs -r strip \
38
43
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
39
44
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
40
45
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
@@ -55,7 +60,7 @@ RUN apt-get update \
55
60
$buildDeps \
56
61
'*-dev' \
57
62
&& rm -rf /var/lib/apt/lists/* \
58
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
63
+ && rm -rf /tmp/* /var/tmp/*
59
64
60
65
RUN groupadd -r fluent && useradd -r -g fluent fluent \
61
66
# for log storage (maybe shared with host)
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ RUN apt-get update \
35
35
&& gem install async -v 1.32.1 \
36
36
&& gem install async-http -v 0.64.2 \
37
37
&& gem install fluentd -v 1.17.1 \
38
+ && export GEM_DIR=$(ruby -e 'puts Gem.dir' ) \
39
+ && echo GEM_DIR=$GEM_DIR \
40
+ && rm -rf $GEM_DIR/cache/*.gem \
41
+ && find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
42
+ && find $GEM_DIR -name "*.so" | xargs -r strip \
38
43
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
39
44
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
40
45
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
@@ -55,7 +60,7 @@ RUN apt-get update \
55
60
$buildDeps \
56
61
'*-dev' \
57
62
&& rm -rf /var/lib/apt/lists/* \
58
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
63
+ && rm -rf /tmp/* /var/tmp/*
59
64
60
65
RUN groupadd -r fluent && useradd -r -g fluent fluent \
61
66
# for log storage (maybe shared with host)
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ RUN apt-get update \
24
24
&& gem install async -v 1.32.1 \
25
25
&& gem install async-http -v 0.64.2 \
26
26
&& gem install fluentd -v 1.17.1 \
27
+ && export GEM_DIR=$(ruby -e 'puts Gem.dir' ) \
28
+ && echo GEM_DIR=$GEM_DIR \
29
+ && rm -rf $GEM_DIR/cache/*.gem \
30
+ && find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
31
+ && find $GEM_DIR -name "*.so" | xargs -r strip \
27
32
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
28
33
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
29
34
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
@@ -44,7 +49,7 @@ RUN apt-get update \
44
49
$buildDeps \
45
50
'*-dev' \
46
51
&& rm -rf /var/lib/apt/lists/* \
47
- && rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
52
+ && rm -rf /tmp/* /var/tmp/*
48
53
49
54
RUN groupadd -r fluent && useradd -r -g fluent fluent \
50
55
# for log storage (maybe shared with host)
You can’t perform that action at this time.
0 commit comments