1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

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 is contained in:
Dave Corson-Knowles 2024-03-07 07:43:18 -08:00 committed by GitHub
parent 6f0e410684
commit 0e77bab00b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 RUN apt-get install --no-install-recommends -y build-essential git libpq-dev pkg-config
# Install application gems # Install application gems
COPY Gemfile Gemfile.lock ./ COPY .ruby-version Gemfile Gemfile.lock ./
RUN bundle install && \ RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile bundle exec bootsnap precompile --gemfile