Skip to content

Commit

Permalink
Strip all binaries for slim images
Browse files Browse the repository at this point in the history
Reduces slim-bookworm image from 180M to 155M.
  • Loading branch information
orgads committed Sep 6, 2024
1 parent 04175a1 commit 551a9d4
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3.1/slim-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.1/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.2/slim-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.2/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.3/slim-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.3/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.4-rc/slim-bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions 3.4-rc/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,18 @@ RUN set -eux; \
--build="$gnuArch" \
--disable-install-doc \
--enable-shared \
{{ if is_slim then ( -}}
debugflags='' \
{{ ) else "" end -}}
{{ if .rust.version then ( -}}
${rustArch:+--enable-yjit} \
{{ ) else "" end -}}
; \
make -j "$(nproc)"; \
make install; \
{{ if is_slim then ( -}}
find /usr/local -type f -executable | xargs grep -IL . | xargs -r strip; \
{{ ) else "" end -}}
\
{{ if .rust.version then ( -}}
rm -rf /tmp/rust; \
Expand Down

0 comments on commit 551a9d4

Please sign in to comment.