Skip to content

Commit 83bbf88

Browse files
committed
Speed up native extension builds
Signed-off-by: Orgad Shaneh <[email protected]>
1 parent 234943a commit 83bbf88

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Dockerfile.template.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ RUN apt-get update \
9797
&& apt-get install -y --no-install-recommends $buildDeps \
9898
<% end %>
9999
&& echo 'gem: --no-document' >> /etc/gemrc \
100+
&& export MAKEFLAGS=-j$(nproc) \
100101
&& gem install oj -v 3.16.11 \
101102
&& gem install json -v 2.13.2 \
102103
&& gem install rexml -v 3.4.1 \
103104
&& gem install async -v 2.24.0 \
104105
&& gem install async-http -v 0.89.0 \
105106
&& gem install fluentd -v <%= fluentd_ver %> \
107+
&& unset MAKEFLAGS \
106108
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
107109
&& echo GEM_DIR=$GEM_DIR \
108110
&& rm -rf $GEM_DIR/cache/*.gem \

v1.19/arm64/debian/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ RUN apt-get update \
1919
" \
2020
&& apt-get install -y --no-install-recommends $buildDeps \
2121
&& echo 'gem: --no-document' >> /etc/gemrc \
22+
&& export MAKEFLAGS=-j$(nproc) \
2223
&& gem install oj -v 3.16.11 \
2324
&& gem install json -v 2.13.2 \
2425
&& gem install rexml -v 3.4.1 \
2526
&& gem install async -v 2.24.0 \
2627
&& gem install async-http -v 0.89.0 \
2728
&& gem install fluentd -v 1.19.0 \
29+
&& unset MAKEFLAGS \
2830
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
2931
&& echo GEM_DIR=$GEM_DIR \
3032
&& rm -rf $GEM_DIR/cache/*.gem \

v1.19/armhf/debian/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ RUN apt-get update \
2828
" \
2929
&& apt-get install -y --no-install-recommends $buildDeps \
3030
&& echo 'gem: --no-document' >> /etc/gemrc \
31+
&& export MAKEFLAGS=-j$(nproc) \
3132
&& gem install oj -v 3.16.11 \
3233
&& gem install json -v 2.13.2 \
3334
&& gem install rexml -v 3.4.1 \
3435
&& gem install async -v 2.24.0 \
3536
&& gem install async-http -v 0.89.0 \
3637
&& gem install fluentd -v 1.19.0 \
38+
&& unset MAKEFLAGS \
3739
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
3840
&& echo GEM_DIR=$GEM_DIR \
3941
&& rm -rf $GEM_DIR/cache/*.gem \

v1.19/debian/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ RUN apt-get update \
1717
" \
1818
&& apt-get install -y --no-install-recommends $buildDeps \
1919
&& echo 'gem: --no-document' >> /etc/gemrc \
20+
&& export MAKEFLAGS=-j$(nproc) \
2021
&& gem install oj -v 3.16.11 \
2122
&& gem install json -v 2.13.2 \
2223
&& gem install rexml -v 3.4.1 \
2324
&& gem install async -v 2.24.0 \
2425
&& gem install async-http -v 0.89.0 \
2526
&& gem install fluentd -v 1.19.0 \
27+
&& unset MAKEFLAGS \
2628
&& export GEM_DIR=$(ruby -e 'puts Gem.dir') \
2729
&& echo GEM_DIR=$GEM_DIR \
2830
&& rm -rf $GEM_DIR/cache/*.gem \

0 commit comments

Comments
 (0)