diff --git a/Dockerfile b/Dockerfile index a5df110b..9592b5ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # el mismo repositorio de trabajo. Cuando tengamos CI/CD algunas cosas # como el tarball van a tener que cambiar porque ya vamos a haber hecho # un clone/pull limpio. -FROM alpine:3.11.6 AS build +FROM alpine:3.12 AS build MAINTAINER "f " ARG RAILS_MASTER_KEY @@ -13,14 +13,15 @@ ENV RAILS_ENV production ENV RAILS_MASTER_KEY=$RAILS_MASTER_KEY RUN apk add --no-cache libxslt libxml2 tzdata ruby ruby-bundler ruby-json ruby-bigdecimal ruby-rake -RUN apk add --no-cache postgresql-libs git yarn brotli libssh2 python +RUN apk add --no-cache postgresql-libs git yarn brotli libssh2 python3 -RUN test "2.6.6" = `ruby -e 'puts RUBY_VERSION'` +RUN test "2.7.1" = `ruby -e 'puts RUBY_VERSION'` # https://github.com/rubygems/rubygems/issues/2918 # https://gitlab.alpinelinux.org/alpine/aports/issues/10808 +RUN apk add --no-cache patch COPY ./rubygems-platform-musl.patch /tmp/ -RUN cd /usr/lib/ruby/2.6.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch +RUN cd /usr/lib/ruby/2.7.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch # Agregar el usuario RUN addgroup -g 82 -S www-data @@ -38,7 +39,7 @@ COPY --chown=app:www-data ./Gemfile . COPY --chown=app:www-data ./Gemfile.lock . RUN bundle install --no-cache --path=./vendor --without='test development' # Vaciar la caché -RUN rm vendor/ruby/2.6.0/cache/*.gem +RUN rm vendor/ruby/2.7.0/cache/*.gem # Copiar el repositorio git COPY --chown=app:www-data ./.git/ ./.git/ @@ -64,7 +65,7 @@ RUN bundle clean RUN rm -rf ./node_modules ./tmp/cache ./.git # Contenedor final -FROM sutty/monit:3.11.6 +FROM sutty/monit:latest ENV RAILS_ENV production # Pandoc @@ -77,12 +78,12 @@ RUN apk add --no-cache postgresql-libs libssh2 file rsync git jpegoptim vips RUN apk add --no-cache ffmpeg imagemagick pandoc tectonic oxipng jemalloc # Chequear que la versión de ruby sea la correcta -RUN test "2.6.6" = `ruby -e 'puts RUBY_VERSION'` +RUN test "2.7.1" = `ruby -e 'puts RUBY_VERSION'` # https://github.com/rubygems/rubygems/issues/2918 # https://gitlab.alpinelinux.org/alpine/aports/issues/10808 COPY ./rubygems-platform-musl.patch /tmp/ -RUN cd /usr/lib/ruby/2.6.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch +RUN cd /usr/lib/ruby/2.7.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch # Necesitamos yarn para que Jekyll pueda generar los sitios # XXX: Eliminarlo cuando extraigamos la generación de sitios del proceso diff --git a/Gemfile b/Gemfile index 9fb6e805..bddf7448 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ git_source(:github) do |repo_name| end # Cambiar en Dockerfile también -ruby '2.6.6' +ruby '2.7.1' gem 'dotenv-rails', require: 'dotenv/rails-now' diff --git a/Gemfile.lock b/Gemfile.lock index 456a54c2..63a4d1f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -627,7 +627,7 @@ DEPENDENCIES yaml_db! RUBY VERSION - ruby 2.6.6p146 + ruby 2.7.1p83 BUNDLED WITH 2.1.4 diff --git a/rubygems-platform-musl.patch b/rubygems-platform-musl.patch index 40347041..d6db223d 100644 --- a/rubygems-platform-musl.patch +++ b/rubygems-platform-musl.patch @@ -1,14 +1,3 @@ ---- rubygems/platform.rb.orig -+++ rubygems/platform.rb -@@ -89,7 +89,7 @@ - when /^dalvik(\d+)?$/ then [ 'dalvik', $1 ] - when /^dotnet$/ then [ 'dotnet', nil ] - when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ] -- when /linux/ then [ 'linux', $1 ] -+ when /linux-?(\w+)?/ then [ 'linux', $1 ] - when /mingw32/ then [ 'mingw32', nil ] - when /(mswin\d+)(\_(\d+))?/ then - os, version = $1, $3 --- rubygems.rb.orig +++ rubygems.rb @@ -764,10 +764,7 @@