From f2b83e709525be3f587f1f39469f119e3218ffd8 Mon Sep 17 00:00:00 2001 From: Valentin Date: Thu, 18 Mar 2021 14:51:57 -0400 Subject: [PATCH 1/2] Dockerfile should use appropriate version of ruby image. Gemfile.lock should request appropriate version of bundler. --- Dockerfile | 3 ++- Gemfile.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37599abf..6ac723b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM ruby:2.4.1 +FROM ruby:2.7.2 ADD Gemfile /app/ ADD Gemfile.lock /app/ WORKDIR /app +RUN bundle update --bundler RUN bundle install ADD . /app diff --git a/Gemfile.lock b/Gemfile.lock index 7121cd64..8d9da7da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,4 +121,4 @@ RUBY VERSION ruby 2.7.2 BUNDLED WITH - 1.17.3 + 2.1.4 From 64e7217f5df3cdcea9e88ebad6dd47cacac73ca2 Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 19 Mar 2021 09:52:56 -0400 Subject: [PATCH 2/2] Unifying Ruby and Bundler version according to CircleCI build Env. --- Dockerfile | 3 +-- Gemfile | 2 +- Gemfile.lock | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ac723b5..56be9d76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,8 @@ -FROM ruby:2.7.2 +FROM ruby:2.5.3 ADD Gemfile /app/ ADD Gemfile.lock /app/ WORKDIR /app -RUN bundle update --bundler RUN bundle install ADD . /app diff --git a/Gemfile b/Gemfile index 103e2abf..869bce30 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '2.7.2' +ruby '2.5.3' gem 'sinatra' gem 'sinatra-flash' diff --git a/Gemfile.lock b/Gemfile.lock index 8d9da7da..feb0ca70 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,7 +118,7 @@ DEPENDENCIES zurb-foundation RUBY VERSION - ruby 2.7.2 + ruby 2.5.3 BUNDLED WITH - 2.1.4 + 1.17.3