Keep .ruby_version file in Docker (#523)

* 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 <zach.gollwitzer@gmail.com>

---------

Signed-off-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
This commit was merged in pull request #523.
This commit is contained in:
Dave Corson-Knowles
2024-03-07 07:43:18 -08:00
committed by GitHub
parent 6f0e410684
commit 0e77bab00b

View File

@@ -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