From c5b00e89aab2622cb206733b632acfb4225dd3b7 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Tue, 23 Feb 2021 00:14:33 +0100 Subject: [PATCH] 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 --- .ruby-version | 2 +- Dockerfile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.ruby-version b/.ruby-version index 73462a5a..37c2961c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.5.1 +2.7.2 diff --git a/Dockerfile b/Dockerfile index d2fbe32e..ad0a5e2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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