Skip to content

Use MAKE="make -j$(nproc)" to speed up bundle install step #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/generators/templates/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ ENV <%= build_env.join(" \\\n ") %>
<% end -%>
# Install application gems
COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock <% if references_ruby_version_file? %><%= ruby_version_file %> <% end %>./
ENV MAKE="make -j$(nproc)"
<% if @netpopbug && Rails.env != "test" -%>
RUN sed -i "/net-pop (0.1.2)/a\ net-protocol" Gemfile.lock
<% end -%>
Expand Down
1 change: 1 addition & 0 deletions test/results/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN curl -sL https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSI

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/bin_cd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/bun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN curl -fsSL https://bun.sh/install | bash -s -- "bun-v${BUN_VERSION}"

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \
bundle config set app_config .bundle && \
bundle config set path /srv/vendor && \
Expand Down
1 change: 1 addition & 0 deletions test/results/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY --link Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ENV AWS_ACCESS_KEY_ID="1" \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/esbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/execjs_importmap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ ENV PATH="/usr/local/node/bin:$PATH"

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/execjs_node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ENV PATH="/usr/local/node/bin:$PATH"

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/fullstaq/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/grover/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ENV PATH="/usr/local/node/bin:$PATH" \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/idle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/jemalloc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/label/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/litefs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/litestream/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/no_prep/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/parallel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FROM prebuild AS build

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/precompile_defer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/rmagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/shrine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/sidekiq/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/solid_queue_postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/solid_queue_sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/swap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/thruster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/trilogy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down
1 change: 1 addition & 0 deletions test/results/vite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
1 change: 1 addition & 0 deletions test/results/yjit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get update -qq && \

# Install application gems
COPY Gemfile Gemfile.lock ./
ENV MAKE="make -j$(nproc)"
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git

Expand Down
Loading