Skip to content

Commit 8186b4c

Browse files
authored
Merge pull request #401 from kenhys/donot-purge-ext-excessively
Do not remove so exessively
2 parents e77ad58 + bba4aec commit 8186b4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile.template.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ RUN apt-get update \
116116
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
117117
&& echo GEM_DIR=$GEM_DIR \
118118
&& rm -rf $GEM_DIR/cache/*.gem \
119-
&& find $GEM_DIR -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rf \
119+
# Don't purge $GEM_DIR/gems/GEM/lib/GEM/ext because it might contain runtime .so (e.g json)
120+
&& find $GEM_DIR -maxdepth 3 -type d -name test -or -name ext -or -name spec -or -name benchmark | xargs -r rm -rfv \
120121
&& find $GEM_DIR -name "*.so" | xargs -r strip \
121122
<% if is_alpine %>
122123
&& gem install bigdecimal -v 1.4.4 \

0 commit comments

Comments
 (0)