We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a124668 + 85bab70 commit 6bb85caCopy full SHA for 6bb85ca
railties/lib/rails/generators/rails/app/templates/Dockerfile.tt
@@ -9,6 +9,8 @@ WORKDIR /rails
9
10
# Set production environment
11
ENV RAILS_ENV="production" \
12
+ BUNDLE_DEPLOYMENT="1" \
13
+ BUNDLE_PATH="/usr/local/bundle" \
14
BUNDLE_WITHOUT="development"
15
16
@@ -33,7 +35,8 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz
33
35
<% end -%>
34
36
# Install application gems
37
COPY Gemfile Gemfile.lock ./
-RUN bundle install<% if depend_on_bootsnap? -%> && \
38
+RUN bundle install && \
39
+ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git<% if depend_on_bootsnap? -%> && \
40
bundle exec bootsnap precompile --gemfile
41
<% end %>
42
0 commit comments