Skip to content

Commit

Permalink
Merge pull request #161 from infosiftr/ruby-libs
Browse files Browse the repository at this point in the history
Adjust scanelf to properly remove "ruby-libs" in the "2.4-alpine3.6" image
  • Loading branch information
yosifkit authored Sep 22, 2017
2 parents 076a28b + c9838b6 commit 00f9161
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
7 changes: 3 additions & 4 deletions 2.2/alpine3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 3 additions & 4 deletions 2.3/alpine3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 3 additions & 4 deletions 2.4/alpine3.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 3 additions & 4 deletions 2.4/alpine3.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 00f9161

Please sign in to comment.