Skip to content

Cleanup large unused files #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile.template.erb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ RUN apt-get update \
&& gem install async -v 1.32.1 \
&& gem install async-http -v 0.64.2 \
&& gem install fluentd -v <%= fluentd_ver %> \
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
&& echo GEM_DIR=$GEM_DIR \
&& rm -rf $GEM_DIR/cache/*.gem \
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
&& find $GEM_DIR -name "*.so" | xargs -r strip \
<% if is_alpine %>
&& gem install bigdecimal -v 1.4.4 \
&& apk del .build-deps \
Expand All @@ -146,7 +151,7 @@ RUN apt-get update \
'*-dev' \
&& rm -rf /var/lib/apt/lists/* \
<% end %>
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
&& rm -rf /tmp/* /var/tmp/*

<% if is_alpine %>
RUN addgroup -S fluent && adduser -S -G fluent fluent \
Expand Down
7 changes: 6 additions & 1 deletion v1.17/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ RUN apk update \
&& gem install async -v 1.32.1 \
&& gem install async-http -v 0.64.2 \
&& gem install fluentd -v 1.17.1 \
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
&& echo GEM_DIR=$GEM_DIR \
&& rm -rf $GEM_DIR/cache/*.gem \
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
&& find $GEM_DIR -name "*.so" | xargs -r strip \
&& gem install bigdecimal -v 1.4.4 \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
&& rm -rf /tmp/* /var/tmp/*

RUN addgroup -S fluent && adduser -S -G fluent fluent \
# for log storage (maybe shared with host)
Expand Down
7 changes: 6 additions & 1 deletion v1.17/arm64/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ RUN apt-get update \
&& gem install async -v 1.32.1 \
&& gem install async-http -v 0.64.2 \
&& gem install fluentd -v 1.17.1 \
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
&& echo GEM_DIR=$GEM_DIR \
&& rm -rf $GEM_DIR/cache/*.gem \
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
&& find $GEM_DIR -name "*.so" | xargs -r strip \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
Expand All @@ -55,7 +60,7 @@ RUN apt-get update \
$buildDeps \
'*-dev' \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
&& rm -rf /tmp/* /var/tmp/*

RUN groupadd -r fluent && useradd -r -g fluent fluent \
# for log storage (maybe shared with host)
Expand Down
7 changes: 6 additions & 1 deletion v1.17/armhf/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ RUN apt-get update \
&& gem install async -v 1.32.1 \
&& gem install async-http -v 0.64.2 \
&& gem install fluentd -v 1.17.1 \
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
&& echo GEM_DIR=$GEM_DIR \
&& rm -rf $GEM_DIR/cache/*.gem \
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
&& find $GEM_DIR -name "*.so" | xargs -r strip \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
Expand All @@ -55,7 +60,7 @@ RUN apt-get update \
$buildDeps \
'*-dev' \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
&& rm -rf /tmp/* /var/tmp/*

RUN groupadd -r fluent && useradd -r -g fluent fluent \
# for log storage (maybe shared with host)
Expand Down
7 changes: 6 additions & 1 deletion v1.17/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ RUN apt-get update \
&& gem install async -v 1.32.1 \
&& gem install async-http -v 0.64.2 \
&& gem install fluentd -v 1.17.1 \
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
&& echo GEM_DIR=$GEM_DIR \
&& rm -rf $GEM_DIR/cache/*.gem \
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
&& find $GEM_DIR -name "*.so" | xargs -r strip \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch" \
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini-$dpkgArch.asc" \
Expand All @@ -44,7 +49,7 @@ RUN apt-get update \
$buildDeps \
'*-dev' \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/* /var/tmp/* /usr/lib/ruby/gems/*/cache/*.gem /usr/lib/ruby/gems/3.*/gems/fluentd-*/test
&& rm -rf /tmp/* /var/tmp/*

RUN groupadd -r fluent && useradd -r -g fluent fluent \
# for log storage (maybe shared with host)
Expand Down