mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05:00
Adjust scanelf to properly remove "ruby-libs" in the "2.4-alpine3.6" image
This saves ~11MB of final image size (~79.4MB down to ~68.5MB).
This commit is contained in:
parent
076a28bbc3
commit
c9838b69af
5 changed files with 15 additions and 20 deletions
|
@ -75,11 +75,10 @@ RUN set -ex \
|
|||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
|
|
|
@ -75,11 +75,10 @@ RUN set -ex \
|
|||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
|
|
|
@ -75,11 +75,10 @@ RUN set -ex \
|
|||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
|
|
|
@ -75,11 +75,10 @@ RUN set -ex \
|
|||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
|
|
|
@ -75,11 +75,10 @@ RUN set -ex \
|
|||
&& make install \
|
||||
\
|
||||
&& runDeps="$( \
|
||||
scanelf --needed --nobanner --recursive /usr/local \
|
||||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
||||
| sort -u \
|
||||
| xargs -r apk info --installed \
|
||||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||
| tr ',' '\n' \
|
||||
| sort -u \
|
||||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||
)" \
|
||||
&& apk add --virtual .ruby-rundeps $runDeps \
|
||||
bzip2 \
|
||||
|
|
Loading…
Reference in a new issue