Skip to content

Commit cf5e38b

Browse files
noma4ibyroot
authored andcommitted
Dockerfile: copy vendor directory to run bundle install
In case some of the gems are in `vendor/gems`.
1 parent e642926 commit cf5e38b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

railties/lib/rails/generators/rails/app/templates/Dockerfile.tt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ RUN curl -fsSL https://bun.sh/install | bash -s -- "bun-v${BUN_VERSION}"
5252

5353
<% end -%>
5454
# Install application gems
55-
COPY Gemfile Gemfile.lock ./
55+
COPY Gemfile Gemfile.lock vendor ./
56+
5657
RUN bundle install && \
5758
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git<% if depend_on_bootsnap? -%> && \
5859
bundle exec bootsnap precompile --gemfile<% end %>
@@ -116,4 +117,4 @@ CMD ["./bin/rails", "server"]
116117
# Start server via Thruster by default, this can be overwritten at runtime
117118
EXPOSE 80
118119
CMD ["./bin/thrust", "./bin/rails", "server"]
119-
<% end -%>
120+
<% end -%>

0 commit comments

Comments
 (0)