mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 17:16:22 +00:00
ruby 2.7.1
This commit is contained in:
parent
c2a4965fed
commit
2b2cb10146
4 changed files with 11 additions and 21 deletions
17
Dockerfile
17
Dockerfile
|
@ -2,7 +2,7 @@
|
||||||
# el mismo repositorio de trabajo. Cuando tengamos CI/CD algunas cosas
|
# 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
|
# como el tarball van a tener que cambiar porque ya vamos a haber hecho
|
||||||
# un clone/pull limpio.
|
# un clone/pull limpio.
|
||||||
FROM alpine:3.11.6 AS build
|
FROM alpine:3.12 AS build
|
||||||
MAINTAINER "f <f@sutty.nl>"
|
MAINTAINER "f <f@sutty.nl>"
|
||||||
|
|
||||||
ARG RAILS_MASTER_KEY
|
ARG RAILS_MASTER_KEY
|
||||||
|
@ -13,14 +13,15 @@ ENV RAILS_ENV production
|
||||||
ENV RAILS_MASTER_KEY=$RAILS_MASTER_KEY
|
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 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://github.com/rubygems/rubygems/issues/2918
|
||||||
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
||||||
|
RUN apk add --no-cache patch
|
||||||
COPY ./rubygems-platform-musl.patch /tmp/
|
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
|
# Agregar el usuario
|
||||||
RUN addgroup -g 82 -S www-data
|
RUN addgroup -g 82 -S www-data
|
||||||
|
@ -38,7 +39,7 @@ COPY --chown=app:www-data ./Gemfile .
|
||||||
COPY --chown=app:www-data ./Gemfile.lock .
|
COPY --chown=app:www-data ./Gemfile.lock .
|
||||||
RUN bundle install --no-cache --path=./vendor --without='test development'
|
RUN bundle install --no-cache --path=./vendor --without='test development'
|
||||||
# Vaciar la caché
|
# 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
|
# Copiar el repositorio git
|
||||||
COPY --chown=app:www-data ./.git/ ./.git/
|
COPY --chown=app:www-data ./.git/ ./.git/
|
||||||
|
@ -64,7 +65,7 @@ RUN bundle clean
|
||||||
RUN rm -rf ./node_modules ./tmp/cache ./.git
|
RUN rm -rf ./node_modules ./tmp/cache ./.git
|
||||||
|
|
||||||
# Contenedor final
|
# Contenedor final
|
||||||
FROM sutty/monit:3.11.6
|
FROM sutty/monit:latest
|
||||||
ENV RAILS_ENV production
|
ENV RAILS_ENV production
|
||||||
|
|
||||||
# Pandoc
|
# 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
|
RUN apk add --no-cache ffmpeg imagemagick pandoc tectonic oxipng jemalloc
|
||||||
|
|
||||||
# Chequear que la versión de ruby sea la correcta
|
# 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://github.com/rubygems/rubygems/issues/2918
|
||||||
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
||||||
COPY ./rubygems-platform-musl.patch /tmp/
|
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
|
# Necesitamos yarn para que Jekyll pueda generar los sitios
|
||||||
# XXX: Eliminarlo cuando extraigamos la generación de sitios del proceso
|
# XXX: Eliminarlo cuando extraigamos la generación de sitios del proceso
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -15,7 +15,7 @@ git_source(:github) do |repo_name|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Cambiar en Dockerfile también
|
# Cambiar en Dockerfile también
|
||||||
ruby '2.6.6'
|
ruby '2.7.1'
|
||||||
|
|
||||||
gem 'dotenv-rails', require: 'dotenv/rails-now'
|
gem 'dotenv-rails', require: 'dotenv/rails-now'
|
||||||
|
|
||||||
|
|
|
@ -627,7 +627,7 @@ DEPENDENCIES
|
||||||
yaml_db!
|
yaml_db!
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.6.6p146
|
ruby 2.7.1p83
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.1.4
|
2.1.4
|
||||||
|
|
|
@ -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.orig
|
||||||
+++ rubygems.rb
|
+++ rubygems.rb
|
||||||
@@ -764,10 +764,7 @@
|
@@ -764,10 +764,7 @@
|
||||||
|
|
Loading…
Reference in a new issue