Skip to content

Commit

Permalink
Keep .ruby_version file in Docker (#523)
Browse files Browse the repository at this point in the history
* Use our .ruby-version file in Bundler so it is managed in only 1 place

See: https://gorails.com/episodes/bundler-ruby-version-file

* Copy Ruby Version file into Docker

* Update Dockerfile

Signed-off-by: Zach Gollwitzer <[email protected]>

---------

Signed-off-by: Zach Gollwitzer <[email protected]>
Co-authored-by: Zach Gollwitzer <[email protected]>
  • Loading branch information
corsonknowles and zachgoll authored Mar 7, 2024
1 parent 6f0e410 commit 0e77bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FROM base as build
RUN apt-get install --no-install-recommends -y build-essential git libpq-dev pkg-config

# Install application gems
COPY Gemfile Gemfile.lock ./
COPY .ruby-version Gemfile Gemfile.lock ./
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
Expand Down

0 comments on commit 0e77bab

Please sign in to comment.