From d78f8601af664dc8c98691fde9d5a839ea86bc14 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 12 Sep 2020 12:05:00 -0300 Subject: [PATCH] ruby 2.7 --- Dockerfile | 9 ++------- rubygems-platform-musl.patch | 11 ----------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6feb536..9377fb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,6 @@ COPY --chown=app:www-data ./Gemfile . COPY --chown=app:www-data ./config.ru . RUN bundle install --path=./vendor -FROM sutty/daemonize:latest AS daemonize - -RUN echo /home/builder/packages/home > /etc/apk/repositories -RUN apk add --no-cache daemonize - FROM sutty/monit:latest ENV RACK_ENV=production @@ -23,7 +18,7 @@ RUN addgroup -g 82 -S www-data RUN adduser -s /bin/sh -G www-data -h /srv/http -D app RUN apk add --no-cache ruby ruby-bundler ruby-json -COPY --from=daemonize /usr/sbin/daemonize /usr/sbin/daemonize +RUN apk add --no-cache daemonize COPY ./monit.conf /etc/monit.d/geminabox.conf COPY ./geminabox.sh /usr/local/bin/geminabox COPY --from=build /srv/http /srv/http @@ -33,7 +28,7 @@ RUN chmod 755 /usr/local/bin/geminabox # 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 apk add --no-cache patch && cd /usr/lib/ruby/2.7.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch && apk del patch EXPOSE 9292 VOLUME /srv/gems diff --git a/rubygems-platform-musl.patch b/rubygems-platform-musl.patch index 4034704..d6db223 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 @@