This commit is contained in:
f 2020-09-12 12:05:00 -03:00
parent b15cd673ea
commit d78f8601af
2 changed files with 2 additions and 18 deletions

View file

@ -11,11 +11,6 @@ COPY --chown=app:www-data ./Gemfile .
COPY --chown=app:www-data ./config.ru . COPY --chown=app:www-data ./config.ru .
RUN bundle install --path=./vendor 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 FROM sutty/monit:latest
ENV RACK_ENV=production 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 adduser -s /bin/sh -G www-data -h /srv/http -D app
RUN apk add --no-cache ruby ruby-bundler ruby-json 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 ./monit.conf /etc/monit.d/geminabox.conf
COPY ./geminabox.sh /usr/local/bin/geminabox COPY ./geminabox.sh /usr/local/bin/geminabox
COPY --from=build /srv/http /srv/http 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://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 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 EXPOSE 9292
VOLUME /srv/gems VOLUME /srv/gems

View file

@ -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 @@