Update to Ruby 2.7 (#2292)

* Update to Ruby 2.7

The currently used Ruby 2.5 is pretty old and is nearing its end of
life [1]. This patch updates the used Ruby version to the current
stable version.

[1] https://www.ruby-lang.org/en/downloads/branches/

* Update .ruby-version to 2.7.2

Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
This commit is contained in:
Lars Kiesow 2021-02-23 00:14:33 +01:00 committed by GitHub
parent 19434df22c
commit c5b00e89aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -1 +1 @@
2.5.1
2.7.2

View File

@ -1,4 +1,4 @@
FROM ruby:2.5.1-alpine AS base
FROM ruby:2.7.2-alpine AS base
# Set a variable for the install location.
ARG RAILS_ROOT=/usr/src/app
@ -24,9 +24,9 @@ COPY Gemfile Gemfile.lock $RAILS_ROOT/
RUN bundle config --global frozen 1 \
&& bundle install --deployment --without development:test:assets -j4 --path=vendor/bundle \
&& rm -rf vendor/bundle/ruby/2.5.0/cache/*.gem \
&& find vendor/bundle/ruby/2.5.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/2.5.0/gems/ -name "*.o" -delete
&& rm -rf vendor/bundle/ruby/2.7.0/cache/*.gem \
&& find vendor/bundle/ruby/2.7.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/2.7.0/gems/ -name "*.o" -delete
# Adding project files.
COPY . .
@ -36,7 +36,7 @@ RUN rm -rf tmp/cache spec
############### Build step done ###############
FROM ruby:2.5.1-alpine
FROM ruby:2.7.2-alpine
# Set a variable for the install location.
ARG RAILS_ROOT=/usr/src/app